Forum Discussion
Anonymous
1 year agoNot applicable
Count based on revenue amount
I need 3 measure like >5, <5, result basically we need to create >5 how many distinct count of desc based on amount criteria, suggest example table: Desc Amount A 10 B 4 C 5 D ...
- 1 year ago
Hi Anonymous
Assuming Amount is a physical column in your table, the measure would be
CALCULATE ( DISTINCTCOUNT ( 'table'[desc] ), keepfilers ( 'table'[amount] ) <= 5 )But youre expected result is confusing thouugh. I thought you wanted the distinct count which means that each value in desc should only be counted once - C has 2. If you mean to say the count of records, use:
CALCULATE ( COUNTROWS ( 'table' ), keepfilers ( 'table'[amount] ) <= 5 )Just change <= to > for a different calculation.
ryan_mayu
Super User
1 year agoAnonymous
you can try this
>5 = CALCULATE(COUNTROWS('Table'),'Table'[Amount]>5)
measure = CALCULATE(COUNTROWS('Table'),'Table'[Amount]<=5)
then update the measure name to <=5