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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Remove rows from a matrix visual

Hello,
I have a matrix with nested rows and 5 columns. 
I need to remove or hide rows that are 0 or empty, but reapear when there is a value in any of the columns other then 0.

dandreev_0-1729602451780.png

Thank you for your help!

 



2 ACCEPTED SOLUTIONS
Kedar_Pande
Super User
Super User

@Anonymous 

Create a Filter Measure:

ShowRow = 
IF (
NOT (
ISBLANK(SUM('YourTable'[Actual])) &&
ISBLANK(SUM('YourTable'[13M AVG])) &&
ISBLANK(SUM('YourTable'[Variance AVG])) &&
ISBLANK(SUM('YourTable'[Budgets])) &&
ISBLANK(SUM('YourTable'[Budget Variance])) &&
SUM('YourTable'[Actual]) = 0 &&
SUM('YourTable'[13M AVG]) = 0 &&
SUM('YourTable'[Variance AVG]) = 0 &&
SUM('YourTable'[Budgets]) = 0 &&
SUM('YourTable'[Budget Variance]) = 0
),
1,
0
)

Set the filter to show only where ShowRow equals 1.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

View solution in original post

Anonymous
Not applicable

Hi @Anonymous ,

 

You can add the appropriate conditions to Kedar_Pande's:

ShowRow = 
SWITCH(
    TRUE(),
    NOT (
        ISBLANK(SUM('YourTable'[Actual])) &&
        ISBLANK(SUM('YourTable'[13M AVG])) &&
        ISBLANK(SUM('YourTable'[Variance AVG])) &&
        ISBLANK(SUM('YourTable'[Budgets])) &&
        ISBLANK(SUM('YourTable'[Budget Variance])) &&
        SUM('YourTable'[Actual]) = 0 &&
        SUM('YourTable'[13M AVG]) = 0 &&
        SUM('YourTable'[Variance AVG]) = 0 &&
        SUM('YourTable'[Budgets]) = 0 &&
        SUM('YourTable'[Budget Variance]) = 0
    ), 1,
NOT (
        ISBLANK(SUM('YourTable'[Actual])) &&
        ISBLANK(SUM('YourTable'[Budgets])) &&
        ISBLANK(SUM('YourTable'[Budget Variance])) &&
        SUM('YourTable'[Actual]) <> 0 &&
        SUM('YourTable'[Budgets]) <> 0 &&
        SUM('YourTable'[Budget Variance]) = 0
    ),1,
0

    
)

 

Still filtering for columns with a value of 1 in the filter.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

4 REPLIES 4
Anonymous
Not applicable

Thank you both for the solution! I twicked it a bit and it works. However, there is another column that shows percentage of type towards the total counts and when I apply the filter it breaks the calculation and it goeas to 100%. It has to do soething with filter context, but still could not figure it out.

Kedar_Pande
Super User
Super User

@Anonymous 

Create a Filter Measure:

ShowRow = 
IF (
NOT (
ISBLANK(SUM('YourTable'[Actual])) &&
ISBLANK(SUM('YourTable'[13M AVG])) &&
ISBLANK(SUM('YourTable'[Variance AVG])) &&
ISBLANK(SUM('YourTable'[Budgets])) &&
ISBLANK(SUM('YourTable'[Budget Variance])) &&
SUM('YourTable'[Actual]) = 0 &&
SUM('YourTable'[13M AVG]) = 0 &&
SUM('YourTable'[Variance AVG]) = 0 &&
SUM('YourTable'[Budgets]) = 0 &&
SUM('YourTable'[Budget Variance]) = 0
),
1,
0
)

Set the filter to show only where ShowRow equals 1.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

Anonymous
Not applicable

I forgot to add one more scenario. When Actual and Budget columns have values, for instance both have 2 and Actual Budget Variance column is equial to 0.

Anonymous
Not applicable

Hi @Anonymous ,

 

You can add the appropriate conditions to Kedar_Pande's:

ShowRow = 
SWITCH(
    TRUE(),
    NOT (
        ISBLANK(SUM('YourTable'[Actual])) &&
        ISBLANK(SUM('YourTable'[13M AVG])) &&
        ISBLANK(SUM('YourTable'[Variance AVG])) &&
        ISBLANK(SUM('YourTable'[Budgets])) &&
        ISBLANK(SUM('YourTable'[Budget Variance])) &&
        SUM('YourTable'[Actual]) = 0 &&
        SUM('YourTable'[13M AVG]) = 0 &&
        SUM('YourTable'[Variance AVG]) = 0 &&
        SUM('YourTable'[Budgets]) = 0 &&
        SUM('YourTable'[Budget Variance]) = 0
    ), 1,
NOT (
        ISBLANK(SUM('YourTable'[Actual])) &&
        ISBLANK(SUM('YourTable'[Budgets])) &&
        ISBLANK(SUM('YourTable'[Budget Variance])) &&
        SUM('YourTable'[Actual]) <> 0 &&
        SUM('YourTable'[Budgets]) <> 0 &&
        SUM('YourTable'[Budget Variance]) = 0
    ),1,
0

    
)

 

Still filtering for columns with a value of 1 in the filter.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.

Top Solution Authors