Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 | 3 |
| C | 2 |
result :
| desc | <=5 | >5 |
| a | 1 | |
| b | 1 | |
| c | 2 | |
| d | 1 |
Solved! Go to Solution.
Hi @RajK2
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 @RajK2,
Thank you for reaching out to Microsoft Fabric Community.
Thank you @danextian and @ryan_mayu for the prompt response.
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by ryan resolved your issue? or let us know if you need any further assistance.
If any response resolved your issue, please mark it as "Accept as solution" and give a kudos if you found it helpful.
Thanks and regards,
Anjan Kumar Chippa
you can try this
Proud to be a Super User!
Hi @RajK2
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.
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)
example : 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 |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |