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
scorbin-j
Helper I
Helper I

Slicer filtering only the measure values in a matrix but not hiding the whole row

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. 

scorbinj_0-1724083054353.png

 

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? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

vxianjtanmsft_0-1724204211349.png

 

 

 

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.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@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))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That does populate the 0s in the date range, but the visual is still not being filtered by the slicer correctly. 

Anonymous
Not applicable

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.

vxianjtanmsft_0-1724204211349.png

 

 

 

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.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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