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 have a category and subcategory which has combination +ve , -ve and 0 values . I would like to create a mesure to calculate the number of categoies ( rows count) which has a positive , negative and zero values . I have created the following for measures to calculate that but it returns the subcategories count rather than a categories count. Please refer the attached images. Anyone please suggest me to find out.
+ve CategoriesCount = CALCULATE(COUNT('Sheet2 (2)'[Category]),'Sheet2 (2)'[Values] >0)
-ve CategoriesCount = CALCULATE(COUNT('Sheet2 (2)'[Category]),'Sheet2 (2)'[Values] <0)
zero CategoriesCount = CALCULATE(COUNT('Sheet2 (2)'[Category]),'Sheet2 (2)'[Values] =0)
Solved! Go to Solution.
Check if DISTINCTCOUNT Function works in your case.
Measure = CALCULATE ( DISTINCTCOUNT ( Table1[Category] ), Table1[Values] > 0 )
Check if DISTINCTCOUNT Function works in your case.
Measure = CALCULATE ( DISTINCTCOUNT ( Table1[Category] ), Table1[Values] > 0 )
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 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 192 | |
| 125 | |
| 99 | |
| 67 | |
| 48 |