Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
Solved! Go to 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.
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 !!!!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
83 | |
75 | |
64 | |
39 | |
34 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |