Forum Discussion
han_rj
1 year agoHelper IV
Hide a row in Matrix
Hi Team, I have created a matrix to show me Product wise sales for 2023,2024 and 2025. I would like to hide rows where the sales of 2023 is 0.00 and the following years are "-"[No values] Cu...
- 1 year ago
Hi han_rj ,
To hide rows in your Power BI matrix where Sales_2023 is 0 and the following years have no values ("-"), create a new measure like this:Show Row = IF ( [Sales_2023] <> 0 || [Sales_2024] <> "-" || [Sales_2025] <> "-", 1, 0 )
Add this Show Row measure to your matrix as a visual-level filter and set it to show only when value is 1. This will hide rows where 2023 is 0 and the other years are blanks/"-".Power BI doesn’t support direct row hiding, but filtering using a measure like this achieves the desired effect.
danextian
1 year agoSuper User
Hi han_rj
I would have modeled this differently. Instead of keeping separate columns for each year and then individual measures for those columns, I would unpivot so there's one column each for year and value and use format strings so zero are shown as -. That aside, try this measure as a visual filter
IF ( [Sales_2023] = 0 && [Sales_2024] = "-" && [Sales_2025] = "-", 1, 0 )