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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Starlord
New Member

Calculate Filter not working

Hi there 

 

I am having a problem with DAX calculate and filter measure. 

 

PopulationFemale = Calculate( SUM ( 'FACT-Population'[Population] ), Filter( 'FACT-Population','FACT-Population'[Gender] = "Female"))

 

Okay so basically i am trying to Calculate the sum in the fact population table in the column Population, but only if the fact population table and to be more precise the fact popultion table and the gender column equals female.

 

So if i happen to just calculate the Sum of the population it displays the result in the visualization but when i include the filter it displays BLANK in the visualization. 

 

Please can someone assist as I am new to POWER BI.  Data model.PNGQuery Editor.PNGVisualization.PNG

 

 

1 ACCEPTED SOLUTION

Then only problem I can think of is that, there is some spaces in Gender dimension. Try Transform -> Trim for Gender column in Query Editor.

View solution in original post

4 REPLIES 4
AkhilAshok
Solution Sage
Solution Sage

Do you have any sync slicers enabled in some other tabs which filter for Male? If you want to replace the filter context of Gender, the better to use: PopulationFemale = Calculate( SUM ( 'FACT-Population'[Population] ),Population'[Gender] = "Female")

Hi there

 

I dont have any sync slicers enabled to filter for male.

 

I tried the below but still shows blank. 

 

PopulationFemale = CALCULATE (sum ('FACT-Population'[Population]),'FACT-Population'[Gender] = "Female")

 

Then only problem I can think of is that, there is some spaces in Gender dimension. Try Transform -> Trim for Gender column in Query Editor.

Yes that was the problem i had some space infront of the Gender.

 

Thank you so much for your help Akhil !!!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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