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 have been reading other solutions for filtering in count measures but so far no luck with mine. Here is my code for a measure:
Total active facilities = CALCULATE(DISTINCTCOUNT('FFAFacilities'[FACILITY_ID]),FILTER('FFAFacilities','FFAFacilities'[CURRENT_STATUS]="01"))
The code doesnt like the filter. It is a string and I tried copying the column and making it a whole number and then filtering it by the value 1 but that also did not work. I also tried all different variations of count so it has something to do with the filter value. Any suggestions would be awesome.
Thanks!
Solved! Go to Solution.
Hi @janegrnisppl ,
Where do you want to apply this measure to? This measure may be affected by the context.
Based on your description, I have created a simple sample:
Please try something like:
Total active facilities = CALCULATE(DISTINCTCOUNT('FFAFacilities'[FACILITY_ID]),FILTER(ALL('FFAFacilities'),'FFAFacilities'[CURRENT_STATUS]="01"))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @janegrnisppl ,
Where do you want to apply this measure to? This measure may be affected by the context.
Based on your description, I have created a simple sample:
Please try something like:
Total active facilities = CALCULATE(DISTINCTCOUNT('FFAFacilities'[FACILITY_ID]),FILTER(ALL('FFAFacilities'),'FFAFacilities'[CURRENT_STATUS]="01"))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you please post a small sample of your FFAFacilities table or attach your pbix file after removing sensitive data.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 102 | |
| 68 | |
| 66 | |
| 58 |