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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
CBO2404
Helper I
Helper I

Matrix Powerbi: How to hide a row (i.e. a measure) if all the months have no value for that measure.

I have a Power BI report (with a live connection to a dataset) that contains a matrix visual.

The Columns field contains the 12 months of this year, and the Values section includes about 20 different measures.

I enabled "Switch to rows" in the format values options, so each measure appears as a separate row.

Now I want to hide a row (i.e. a measure) if all the months have no value ( blanks) for that measure.

Turning off "Show on blank rows" has no effect.

Does anyone have an idea how this can be solved? ChatGPT couldn't provide a working solution, so I'm hoping one of you can help.

1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hi @CBO2404 ,
This is a common challenge when using a matrix visual in Power BI, especially with a live connection where calculated columns or tables aren't an option. Since you’ve already enabled "Show values as rows" and turned off "Show on blank rows" (which typically only applies to rows from the data model, not measures), the matrix will still display all measures, even if they are entirely blank across the columns. Unfortunately, Power BI does not natively support dynamic hiding of measures (rows in this case) based on all-blank results. 

 

A common workaround is to create a parent measure for each of your measures that checks whether it returns any non-blank values across the time range. Then, you could use a disconnected table to list the measure names and only show those that meet the non-blank condition using a slicer or dynamic calculation group. 

 

However, this approach requires changes to the model, which isn’t feasible with a live connection. In that case, your best option may be to request model changes on the dataset side or use Power BI Desktop with an import mode if possible, where more advanced DAX and visual-level filtering techniques can be applied.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

7 REPLIES 7
CBO2404
Helper I
Helper I

How can I hide SUMC???

My Example table

CBO2404_0-1748253889324.png

My Measures:

SUMA = CALCULATE(SUM(Example[valueA]))
SUMB = CALCULATE(SUM(Example[valueB]))
SUMC = CALCULATE(SUM(Example[valueC]))
MeasureVisibility =
IF(ISBLANK(CALCULATE([SUMA])) &&ISBLANK(CALCULATE([SUMB])) &&ISBLANK(CALCULATE([SUMC])),0,1)

My Visual and filters:
CBO2404_1-1748254035083.png
CBO2404_2-1748254076818.png

 

Hi @CBO2404 ,

Please include the DAX that you have just created in the values column

vnmadadimsft_0-1748272773911.png

Once that is done you will find an additional column in your matrix/table

vnmadadimsft_1-1748272822806.png

You can use Visual level filter to filter out the 0 values.

Attaching the PBIX where I tried out the above mentioned dax as reference.

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thank you

Thanks for your effort and your example. However, I have the 'Switch values to rows' option turned on, which means the values are placed in the rows. In that case, your solution doesn't work.

rohit1991
Super User
Super User

Hi @CBO2404 ,
This is a common challenge when using a matrix visual in Power BI, especially with a live connection where calculated columns or tables aren't an option. Since you’ve already enabled "Show values as rows" and turned off "Show on blank rows" (which typically only applies to rows from the data model, not measures), the matrix will still display all measures, even if they are entirely blank across the columns. Unfortunately, Power BI does not natively support dynamic hiding of measures (rows in this case) based on all-blank results. 

 

A common workaround is to create a parent measure for each of your measures that checks whether it returns any non-blank values across the time range. Then, you could use a disconnected table to list the measure names and only show those that meet the non-blank condition using a slicer or dynamic calculation group. 

 

However, this approach requires changes to the model, which isn’t feasible with a live connection. In that case, your best option may be to request model changes on the dataset side or use Power BI Desktop with an import mode if possible, where more advanced DAX and visual-level filtering techniques can be applied.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
bhanu_gautam
Super User
Super User

@CBO2404 Create a new measure:

DAX
MeasureVisibility =
IF(
ISBLANK(CALCULATE(SUM([YourMeasure1])) &&
ISBLANK(CALCULATE(SUM([YourMeasure2])) &&
... &&
ISBLANK(CALCULATE(SUM([YourMeasure20]))),
0,
1
)

 

Go to the matrix visual and add the MeasureVisibility measure to the visual-level filters pane.
Set the filter to show only rows where MeasureVisibility is 1.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






This will give an error on SUM([YourMeasure1]): Parameter is not the correct type.

Hi @CBO2404 ,

Please modify the DAX measure like this and then try to filter at visual level

MeasureVisibility = 
IF(
ISBLANK(CALCULATE(Table[Measure1])) &&
ISBLANK(CALCULATE(Table[Measure2])),
... &&
ISBLANK(CALCULATE(SUM([YourMeasure20]))),
0,
1

Here is the screenshot of it working for my sample data

vnmadadimsft_1-1747924049233.png

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thank you

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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