Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Good Afternoon,
Hopefully someone can help me with the below.
I am trying to create the below measure but get a blank value when used with a card visual with no filter
Gender Ratio =
var FemalePopulation = CALCULATE(Countries[Population], Countries[Gender] = "Female")
var MalePopulation = CALCULATE(Countries[Population], Countries[Gender] = "Male")
Return
DIVIDE(FemalePopulation, MalePopulation)As a test I tried the below which also returns blank
test = CALCULATE(AVERAGE(Countries[Population]), (Countries[Gender] = "Male"))
I then tried to use summarize but got a syntax error
Table =
SUMMARIZE(Countries,Countries[Country Code],Countries[Age Range],Countries[Year],
DIVIDE(
CALCULATE (Countries[Population], Countries[Gender] = "Female"),
CALCULATE(Countries[Population], Countries[Gender] = "Male"))
)
Kind regards,
Tim
Solved! Go to Solution.
There's no aggregation i.e. SUM, COUNT, AVERAGE in the first measure shown.
The 2nd one will give results if the datatypes on the columns are correct and there's no spaces or case differences in the Gender column.
2 things to try:
Can you post a small sample of data please (not a picture) and say what the desired outcome is?
Maybe you could create a measure
AVERAGE(Countries[Population])
and just test that on a card. You could apply a filter from the filter pane (using Gender to test Male/Female) to further test.
There's no aggregation i.e. SUM, COUNT, AVERAGE in the first measure shown.
The 2nd one will give results if the datatypes on the columns are correct and there's no spaces or case differences in the Gender column.
2 things to try:
Can you post a small sample of data please (not a picture) and say what the desired outcome is?
Maybe you could create a measure
AVERAGE(Countries[Population])
and just test that on a card. You could apply a filter from the filter pane (using Gender to test Male/Female) to further test.
Thanks, it was a leading space.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |