1. Andrew Davis
  2. PowerBuilder
  3. Friday, 25 January 2019 15:10 PM UTC

Hi

I am creating a crosstab report - in pb2017 r2 - where I have items down the side and date across - as per below

 

item                 pieces

                       15 Jan        16 Jan  .......... Total 

sheets               50               40 ..............

Pillowcases        112             75 .............

duvets              48               39 ............

towels              210            160 ............

bath mat           45              35 ............

 

I want to add some columns at the end of the report - I have managed to add average and max using

crosstabavg(1) and crosstabmax(1)

But I also need to add a column that using the data for one of the items -  in the case above bath mat - and creates the ratios for each items - so in column 1 I would want to show sheets ratio ( 50 / 45 ) ( number of sheets / number of bath mats  15th jan )  and ( 40/35 ) ( number of sheets / number of bath mats 16th jan ) pillowcases ( 112 / 45 ) and ( 75 / 45 ) etc 

How do I reference the values I require / for each date and then the ratio for the totals

as always any help really appreciated

 

Andrew

 

 

Olan Knight Accepted Answer Pending Moderation
  1. Friday, 25 January 2019 18:45 PM UTC
  2. PowerBuilder
  3. # 1

In the past, editing a crosstab window was an exercise in futility.

What thet means is that if you wanted to add or drop columns, you had to rebuild the crosstab DW. I do not know if that's still true in Appeon's version of PB, but I'd bet that's still the case.

Save yourself some grief and just rebuild the DW. Note that it's WAY easier to do this when you EXPORT the current DW and make your tweaks to it.

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.