Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
markazali
Frequent Visitor

Measure evaluates differently when used as filter on visual?

I have a measure that's:

totaldiv = DISTINCTCOUNT(Emp[divNo])
 
It's intended to count the different divisions in a dataset. When I use it in a card, I'm seeing the right value (e.g. 5).
 
When I apply the measure to a filter on visual, and use "greater than 1", all the slicers items are hidden. I dropped it down to "greater than 0" and the items are shown. This tells me the slicer filter evaluates the same measure as 1 instead of 5.
 
Is there something I'm missing about using a measure this way?
1 REPLY 1
amitchandak
Super User
Super User

@markazali , Visual filter will use row context, and card do have row context so result are different

 

to get same result try with visual column

 

Sumx(Filter(Summarize(Emp, dim[col1], Dim2[Col2], "_1", DISTINCTCOUNT(Emp[divNo])), [_1] >1), [_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.