Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am trying to create a report that counts in a certain way, and not sure how to go about doing that. I might have used a wrong title here, but here goes...
Suppose I have the dataset below, and I would like to create a report that calculates total values as well as counts the number of IDs whose value_1 is greater than value_2.
I am having trouble counting the number of IDs. My desired result/report is also shown below. Thank you.
DATASET:
YYYYMM | ID | Value 01 | Value 02 |
201303 | 1 | 1 | 29 |
201303 | 2 | 92 | 88 |
201303 | 3 | 58 | 40 |
201303 | 4 | 91 | 50 |
201304 | 1 | 40 | 47 |
201304 | 2 | 64 | 46 |
201304 | 3 | 51 | 96 |
Desired Result/Report:
Total Value 1 | 397 |
Total Value 2 | 396 |
Total # of IDs | 4 |
# of IDs: Value 1 > Value 2 | 2 |
# of IDs: Value 1 <= Value 2 | 2 |
Hi Kush,
last question (I promise). What if I would like to add values associated to those IDs, what sort of expression I need to use. Again, thank you for your help.
Below is my desired results.
Dim_01 | Grand Total | Measure 01 | Measure 02 | # IDs > | Value (# IDs >) | Value (# IDs <=) |
946 | 946 | 881 | 3 | |||
AA | 279 | 279 | 235 | 2 | 279 | 0 |
BB | 303 | 303 | 231 | 1 | 210 | 93 |
CC | 307 | 307 | 132 | 2 | 307 | 0 |
DD | 52 | 52 | 194 | 0 | 0 | 194 |
EE | 5 | 5 | 89 | 0 | 0 | 89 |
i am not sure what you are looking for but see the attched one..
is it what you are looking for
Yes, thank you so much for your help.