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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
When adding IF/COALESCE logic to change blanks to zeroes in a measure, the filters are being removed completely on the visuals using those measures!
It is effectively changing
Measure = SUM(table[column])
to
Measure = COALESCE(SUM(table[column]),0)
or the same with an IF instead.
Solved! Go to Solution.
@davv36 , +0 or coalesce can remove context. So in case of date I pushed it back like
0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))
@amitchandak , Hi ! Sorry to activate an alreay answered question but I have a similar problem. But instead of a date filter my filter is 'Department'( Salesperson from different department) , how do I change the above mention dax. minx, maxx doesn't work here obviously. Is there a solution?
@davv36 , +0 or coalesce can remove context. So in case of date I pushed it back like
0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))
Sorry about raising an older question, but I am trying to understand the why with this.
I had a similar issue where the filtering was removed on a Matrix table, with multiple rows, where I did a COALESCE to default to zero.
I applied your fix above and yes, it fixed the problem.
But the question still remains, why? Why does DAX behave like this?
Hi, I have the same issue. I don't know why remove the context of the filter using COALESCE. I have one table with dates, and more columns, I filter the table by year and with COALESCE(COUNT(),0) I count the number of rows but it appears as 0 rows with dates in 2022
When I have filtered the table by 2023
Thank you - works perfectly!
Check out the November 2025 Power BI 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!