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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
James314
Frequent Visitor

Measure is not being affected by a filter with the same field.

Hi

 

I have the following measure: 

 

Admissions = CALCULATE(SUM('Fact'[Attends]),'Fact'[Admitted?]="Admitted")
 
It's working fine and most filters are affecting it as they should, however the on page filter visual for 'Fact'[Admitted?] (same field as in the measure) is not working.
 
When I select "Not Admitted" in the on page filter visual I expect the measure to show 0 but it isn't changing. Resulting in having more admission than attends.
 
I can't share data as it is sensitive and I don't have time to make a dummy dataset right now. I'm hoping someone can tell me theres a way to have a filter in a CALCULATE statement and in an on page filter visual working together.
 
Thanks in advance.
1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @James314 - Use the below measure with explicitly by using filter function within calculate

 

Admissions =
CALCULATE(
SUM('Fact'[Attends]),
FILTER(
'Fact',
'Fact'[Admitted?] = "Admitted"
)
)

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @James314 - Use the below measure with explicitly by using filter function within calculate

 

Admissions =
CALCULATE(
SUM('Fact'[Attends]),
FILTER(
'Fact',
'Fact'[Admitted?] = "Admitted"
)
)

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





This is great thank you! Can I ask why this works?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors