Forum Discussion
Count based on revenue amount
- 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.
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.
- Anonymous1 year agoNot applicable
It doesn't works...
Let me clarify , I've 50 million rows so i have summarized table in PBI, you can see sample below.
I need classifcation <5, >5 based on description count & sales.
we need the result based on the input 'summarize table' . suggest on DAX
tried measurement
Test = COUNTAX('table',[amount]>5)
desc <5 = IF([amount]<5,[desc]) //description countdesc >5 = IF([amount]>5,[desc]) //description countexample : sum table in PBI
Desc Amount A 10 B 4 C 5 D 3 C 2 result :
desc <=5 >5 a 1 b 1 c 2 d 1