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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi powerbi community
I'm trying to do count on columns, in the case i get a match on certain criteria, but my measure is ignoring the global context (as in, if i filter on the criteria itself on the case where i should get no values, my result stays the same instead of 0.
I've been able to recreate the problem with smaller data:
| data | id |
| red | 1 |
| orange | 2 |
| red | 3 |
| orange | 4 |
| red | 5 |
| yellow | 6 |
| blue | 7 |
| orange | 8 |
| blue | 9 |
| orange | 10 |
Here "Data" and "id" are read as text.
The measures are :
The expected result is that if I create a slicer on "ID" and select anything but "3", i should get 0.
But here is the result i get :
I noticed that "Measure 3" returns 1 whenever i choose an id with "Data" value "red".
Could someone explain me this behaviour and how to get the expected result please ?
Thank you
Solved! Go to Solution.
@Anonymous , Try like
Measure 3 = CALCULATE([Measure2], filter(aTest, aTest[id] = "3"))
refer if needed
http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/
@Anonymous , Try like
Measure 3 = CALCULATE([Measure2], filter(aTest, aTest[id] = "3"))
refer if needed
http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 57 | |
| 53 | |
| 42 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 112 | |
| 106 | |
| 39 | |
| 36 | |
| 27 |