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
Hello,
I need to distinctcount the IDs when the status is only equal to "Pushed" or "Already pushed" (if an ID has a different status, don't count it). Here is a sample table :
| ID | Status |
| 1 | Pushed |
| 2 | Pushed |
| 2 | To do |
The result should be 1 because only one ID has the status exactly equal to "Pushed" or "Already pushed". But my current measure is wrong because it returns 2. My current measure is :
How can I get this measure to return 1 ?
Thank you
Best regards
Solved! Go to Solution.
Here is one measure expression that should work.
Only Pushed =
COUNTROWS(
FILTER(
VALUES( T3[ID] ),
ISBLANK(
CALCULATE( COUNT( T3[ID] ), NOT T3[Status] IN { "Pushed", "Already Pushed" } )
)
)
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi,
Please try the below measure, and check the attached file.
expected result: =
VAR allid =
VALUES ( 'Fact Assets'[ID] )
VAR idnotwant =
CALCULATETABLE (
VALUES ( 'Fact Assets'[ID] ),
NOT ( 'Fact Assets'[Status] IN { "Pushed", "Already pushed" } )
)
VAR onlyidwant =
EXCEPT ( allid, idnotwant )
RETURN
COUNTROWS ( onlyidwant )
Here is one measure expression that should work.
Only Pushed =
COUNTROWS(
FILTER(
VALUES( T3[ID] ),
ISBLANK(
CALCULATE( COUNT( T3[ID] ), NOT T3[Status] IN { "Pushed", "Already Pushed" } )
)
)
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 |