Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hey all,
Trying to calculate percentage of row total exluding blanks.
In this example, it's the proportions of individuals that fall into certain BMI categories for each year.
To do this, I'm using the DAX:
Issue is, some of the individuals don't have a BMI category stated, so there are blanks like so -
Is there a way to calculate these proportions exluding blanks?
- Thanks all!
Solved! Go to Solution.
Two approaches can solve this:
1. Assuming you filter out \ slice out the blank BMI
% In Population =
DIVIDE (
COUNT ( 'Fact Table'[PersonKey] ),
CALCULATE (
COUNT ( 'Fact Table'[PersonKey] ),
ALLSELECTED('Measurement Details'[BMI Category])
)
)
2. Assuming you don't manually filter out anything:
CALCULATE (
DIVIDE (
COUNT ( 'Fact Table'[PersonKey] ),
CALCULATE (
COUNT ( 'Fact Table'[PersonKey] ),
REMOVEFILTERS ('Measurement Details'[BMI Category] ),
KEEPFILTERS ( NOT ( ISBLANK ( 'Measurement Details'[BMI Category] ) ) )
)
),
KEEPFILTERS ( NOT ( ISBLANK ( 'Measurement Details'[BMI Category] ) ) )
)
You may add to the CALCULATE:
Proportions =
DIVIDE(
COUNT('Fact Table'[PersonKey]),
CALCULATE(
COUNT('Fact Table'[PersonKey]),
REMOVEFILTERS('Measurement Details'[BMI Category]),
KEEPFILTERS(NOT ( ISBLANK('Measurement Details'[BMI Category])))
)
)
Thank you for such a prompt suggestion! Gave it a try but it's still considering those blanks (hid them in the filters in this example)
Two approaches can solve this:
1. Assuming you filter out \ slice out the blank BMI
% In Population =
DIVIDE (
COUNT ( 'Fact Table'[PersonKey] ),
CALCULATE (
COUNT ( 'Fact Table'[PersonKey] ),
ALLSELECTED('Measurement Details'[BMI Category])
)
)
2. Assuming you don't manually filter out anything:
CALCULATE (
DIVIDE (
COUNT ( 'Fact Table'[PersonKey] ),
CALCULATE (
COUNT ( 'Fact Table'[PersonKey] ),
REMOVEFILTERS ('Measurement Details'[BMI Category] ),
KEEPFILTERS ( NOT ( ISBLANK ( 'Measurement Details'[BMI Category] ) ) )
)
),
KEEPFILTERS ( NOT ( ISBLANK ( 'Measurement Details'[BMI Category] ) ) )
)
ALLSELECTED worked an absolute treat. Thank you so much! ๐
The section option didn't want to work for me, but I found tweaking it to the following did - sharing in case this helps anymore else
Pupil % = CALCULATE (
DIVIDE (
COUNT ( 'Fact Table'[PersonKey] ),
CALCULATE (
COUNT ( 'Fact Table'[PersonKey] ),
REMOVEFILTERS ('Measurement Details'[BMI Category] ),
KEEPFILTERS ('Measurement Details'[BMI Category] <>BLANK())
)
),
KEEPFILTERS ('Measurement Details'[BMI Category] <>BLANK())
)
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!