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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.