Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have done this before and it worked like a charm, but for some reason my expressions are not working like they should this time around.
I created a band that seggregates the amounts into the various categories based on the year. These values were deflated to show a more realistic amount, and then categorized with the dimensions. Now, when I try to produce a percentage based on the column totals within the expressions it does not want to work.
See Results below of what I am obtaining/ This happens for all the year. I've only shown for the one:
2009 | |||
---|---|---|---|
Band | count(RecordNumber) | sum( TOTAL <Year> RecordNumber) | aggr(sum(RecordNumber),Year) |
R0-R100K | 326 | 326 | |
R101-R200K | 2096 | 2096 | |
R201-R300K | 2576 | 2576 | 11964 |
R301-R400K | 2478 | 2478 | |
R401-R500K | 1506 | 1506 | |
R501-R750K | 1684 | 1684 | |
R751K + | 1298 | 1298 |
I would like to take the count(RecordNumber) and divide it by the total of the row.
Thanks
Thanks Brenner. That doesn't work as count(total Recordnumber) sums the values for all the records in the table and not just by each year (column).
However, I obtained the answer on twitter from @countnazgul:
"use aggr(NoDistinct sum( ... to have the total number in all rows"
The reason for using NoDistict as per @countnazgul is that "aggr return only 1 num - total for whole year.nodistinct spreads this num across all rows.distinct is ON by default for aggr"
Hope this helps others out there.
Hi,
you need only to enter:
Count (RecordNumber)/Count (Total RecordNumber)
Thanks Brenner. That doesn't work as count(total Recordnumber) sums the values for all the records in the table and not just by each year (column).
However, I obtained the answer on twitter from @countnazgul:
"use aggr(NoDistinct sum( ... to have the total number in all rows"
The reason for using NoDistict as per @countnazgul is that "aggr return only 1 num - total for whole year.nodistinct spreads this num across all rows.distinct is ON by default for aggr"
Hope this helps others out there.