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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Don't sum/calculate in measures when adjacent column is blank

Hello,

 

So I have an issue where a target field is populated before the sales data arrives at the start of the month.  This is skewing my results.  In a table this isn't too much of a problem because you can just filter out the row using 'is not blank' tick box and it will re-calculate the data.

 

Sales MTDBudget MTDVarianceVariance%
7090-20-22.2
5070-20-28.6
2560-35-58.3
 55-55-100.0
145275-130-47.27

 

My question is about the measures which I drop into cards.  How do you stop it counting the blank rows?  If the Sales MTD column/row is blank, I don't want it to add in values from the budget or variance columns into my measures either.  This is my DAX:

 

Sales MTD: 

CALCULATE(TOTALMTD([SQLSales],DateDimension[Date]),DateDimension[Date]<=TODAY())
 
Budget MTD: 
[Target MTD]*(DIVIDE([Workdays Passed CM],[Work Days CM],0))
 
Variance%MTD =
VAR __BASELINE_VALUE = [Budget MTD Calc]
VAR __VALUE_TO_COMPARE = [SQLSalesMTD]
RETURN
    IF(
        NOT ISBLANK(__VALUE_TO_COMPARE),
        DIVIDE(__VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE)
    )
 
VarianceSQLMTD = ([SQLSalesMTD]-[Budget MTD Calc])

 

Any ideas would be really welcome.  Thank you.

 

1 REPLY 1
Anonymous
Not applicable

HI @Anonymous ,

Can you please share some sample data for test?

How to Get Your Question Answered Quickly
Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors