Forum Discussion
ManjunathaEP
Helper II
5 years agoCount rows within the calculated measure
Hi, Thank you for your support on this.
I have a typical requirement to find the orders count for the calculated measure. please find the sample data and calculated measure as given below:
| order No | Cust Name | Y/N? | Revenue class | Amount |
| 111 | ABC | Y | Apple | 100 |
| 112 | XYZ | N | Apple | 22 |
| 113 | ABC | N | Apple | 300 |
| 114 | XYZ | Y | Orange | 66 |
| 115 | DFG | N | Apple | 667 |
| 116 | DDF | Y | Orange | 567 |
| 112 | XYZ | N | Mango | 345 |
| 111 | ABC | Y | Mango | 349 |
| 117 | ABC | N | Orange | 147 |
I have calculated a measure = calculate(DISTINCTCOUNT('Table'[order No]),FILTER(VALUES('Table'[Cust.Name]),CALCULATE(DISTINCTCOUNT('Table'[Y/N?])>1))) and I got the answer "5" orders.
(Ord No= 111,112,113,114 and 117)
Now: I would like to get the count of orders by Rev.Class. In the given example: The answer should be Apple=3, Mango=1 and Orange=2.
My requirement here is to calculate the count of orders by Rev.class, which is equal to the calculated measure above.
No RepliesBe the first to reply