Forum Discussion

AlejandroPNW's avatar
AlejandroPNW
Microsoft Employee
1 year ago
Solved

Hide Measure Row in Matrix

Hi There - 

 

Hoping someone on here knows how to hide a particular row created by a measure. Or, if I can hide the row and column labels for the matrix visual.

 

Here's the situation: I've created a matrix that shows a measure (let's just say sales) for the last 6 months as well as the year previous. 

 

 

I've created a Year over Year measure that works, but when I put it into the values selection of the visual, this is what happens: 

 

The fact that 2023 is also being considered here is making the graphic unnecesarily cluttered (in my opinion) and I was looking for a way to remove that 2023 comparison. 

 

I thought about making a second matrix, but if I do that, then the year and month labels still pop up which makes it a little cluttered again. 

 

Thanks for the help in advance!

 

13 Replies

  • Here is one option, its doesnt remove the row, but it removes the values.

    RemovePreviousYear =

     VAR _PrevYear = YEAR(TODAY()) - 1
     RETURN

     IF(
        SELECTEDVALUE([YourYearAxisColumn]) = _PrevYear,
        BLANK(),
        [YourYOYMeasure]
     )
     
    I havent found a way to remove the row entirely.
  • v-aatheeque's avatar
    v-aatheeque
    Community Support

    Hi AlejandroPNW

    If the response addressed by the  Tutu_in_YYC , Greg_Deckler  is resolved for  your query , please mark it as Accept Answer and click Yes if you found it helpful.

    Should you have any further questions, feel free to reach out. Thank you for being a part of the Microsoft Fabric Community Forum!

     

  • AlejandroPNW's avatar
    AlejandroPNW
    Microsoft Employee

    Greg_Deckler I think you're helping me be closer! 

     

    But I'm pretty picky about how it looks. 

     

     

    That middle line breaks up the numbers in a way I don't love. I've tried filtering out blank values, but that removes the 2023 totals as well, which I want to keep. I feel like removing that row entirely may be tricky.

     

    Is there a way to hide the column and row names that you know of? 

  • v-aatheeque's avatar
    v-aatheeque
    Community Support

    Hi  AlejandroPNW ,

    To remove 2023 from your Power BI matrix using a date filter:

     

    1. Add the Date field to the Visual level filters pane.
    2. Click the dropdown on the Date field, select Advanced filtering.
    3. Set the filter condition to is not and choose 2023 as the value to exclude it.

    This will remove 2023 from your matrix visual.

    • AlejandroPNW's avatar
      AlejandroPNW
      Microsoft Employee

      If I remove all of 2023, I would lose the values and the measure, no? I wanted to remove only the row with the blank line which occurs in 2023 in addition to the sales values. 

      • v-aatheeque's avatar
        v-aatheeque
        Community Support

        Hi AlejandroPNW ,

        In the matrix, apply a filter on the measure to exclude blank values: 

        Drag your measure to the Visual-Level Filters pane. 

        Set the filter condition to is not blank. This will ensure only rows with valid data are displayed, including the values for 2023, while hiding the unwanted blank line.

        Did I answer your question? Then please mark my post as the solution.
        If I helped you, click on the Thumbs Up to give Kudos.