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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Sokolymbaas
New Member

Hide subcategories which have at least one blank value in matrix column

Hello! 
Could you please help me to solve the problem?

I got matrix visual, in rows - categories and subcategories, in columns - month number in year, in values = average amount of sold products. As you see not all subcategories have sales in every month. So i would like to hide these kind of categories dynamically.

I have tried to set a filter on visual "Metric does not equal blank" but it hasn't worked.
I attached matrix example and measure i use: AVERAGE ( 'fct_table'[ValueColumn] )

Sokolymbaas_0-1726059138115.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sokolymbaas ,

 

I have created an example using this data that you can adapt to your situation.

vkaiyuemsft_0-1726127871604.png

 

1. Create a measure and calculate the average.

Measure = 
AVERAGE(financials[ Sales])

 

2. create measure and set all rows with blank values to blank.

Measure2 =
VAR _count =
    CALCULATE (
        DISTINCTCOUNT ( financials[Month Number] ),
        FILTER (
            ALL ( 'financials' ),
            'financials'[Product] = MAX ( 'financials'[Product] )
                && 'financials'[Discount Band] = MAX ( 'financials'[Discount Band] )
        )
    )
RETURN
    IF (
        ISINSCOPE ( financials[Discount Band] )
            && _count <> 12,
        BLANK (),
        [Measure]
    )


3. Be careful not to check show items with no data.

vkaiyuemsft_1-1726127936362.png


The following figure shows the different cases of using measure and measure2, more details can be found in the attachment.

vkaiyuemsft_2-1726127965293.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If there is any 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
Anonymous
Not applicable

Hi @Sokolymbaas ,

 

I have created an example using this data that you can adapt to your situation.

vkaiyuemsft_0-1726127871604.png

 

1. Create a measure and calculate the average.

Measure = 
AVERAGE(financials[ Sales])

 

2. create measure and set all rows with blank values to blank.

Measure2 =
VAR _count =
    CALCULATE (
        DISTINCTCOUNT ( financials[Month Number] ),
        FILTER (
            ALL ( 'financials' ),
            'financials'[Product] = MAX ( 'financials'[Product] )
                && 'financials'[Discount Band] = MAX ( 'financials'[Discount Band] )
        )
    )
RETURN
    IF (
        ISINSCOPE ( financials[Discount Band] )
            && _count <> 12,
        BLANK (),
        [Measure]
    )


3. Be careful not to check show items with no data.

vkaiyuemsft_1-1726127936362.png


The following figure shows the different cases of using measure and measure2, more details can be found in the attachment.

vkaiyuemsft_2-1726127965293.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

quantumudit
Super User
Super User

Hello @Sokolymbaas 

Do you want to hide the entire sub-category row even if a single month doesn't have the sales value?

Yeah, thats excactly what i want to do.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.