Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a measure that is made to show 0 quantites for a material on dates where there isn't a transaction. That measure looks like this:
RequirementsAllDates =
SUMX(
VALUES(dates[Date]),
IF(
ISBLANK(
CALCULATE(
SUM(Requirements[Qty]),
FILTER(
ALLSELECTED(dates),
dates[Date] = EARLIER(dates[Date])
)
)
),
0,
CALCULATE(
SUM(Requirements[Qty]),
FILTER(
ALLSELECTED(dates),
dates[Date] = EARLIER(dates[Date])
)
)
)
)
That returns the results I want in my matrix visual which has material_id as the rows, dates as the columns, and that measure as the values. However, I am using a material_id bridge table (in order to filter multiple visuals with one slicer on the page) and that slicer is filtering the values in the matrix, but not the rows them themselves. So when I filter for one material_id it shows all 0s for the Qty values of the other material_ids but the rows do not disappear.
In other visuals using different measures the rows themselves are being filtered, but here it's only the values. Is there something in my measure that would prevent the rows from filtering correctly?
Solved! Go to Solution.
Hi @scorbin-j
To solve this problem, you can try to modify your measure so that it returns “BLANK()” instead of “0”. This way, Power BI will automatically hide these blank rows.
_RequirementsAllDates =
SUMX(
VALUES(dates[Date]),
IF(
ISBLANK(
CALCULATE(
SUM(Requirements[Qty]),
FILTER(
ALLSELECTED(dates),
dates[Date] = EARLIER(dates[Date])
)
)
),
BLANK(),
CALCULATE(
SUM(Requirements[Qty]),
FILTER(
ALLSELECTED(dates),
dates[Date] = EARLIER(dates[Date])
)
)
)
)
Here is my test result, I hope this can meet your requirement.
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@scorbin-j , if you handle isblank with 0 this will happen
Try 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))
That does populate the 0s in the date range, but the visual is still not being filtered by the slicer correctly.
Hi @scorbin-j
To solve this problem, you can try to modify your measure so that it returns “BLANK()” instead of “0”. This way, Power BI will automatically hide these blank rows.
_RequirementsAllDates =
SUMX(
VALUES(dates[Date]),
IF(
ISBLANK(
CALCULATE(
SUM(Requirements[Qty]),
FILTER(
ALLSELECTED(dates),
dates[Date] = EARLIER(dates[Date])
)
)
),
BLANK(),
CALCULATE(
SUM(Requirements[Qty]),
FILTER(
ALLSELECTED(dates),
dates[Date] = EARLIER(dates[Date])
)
)
)
)
Here is my test result, I hope this can meet your requirement.
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.