Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

How to hide repeated values in matrix

Hello,
How do I hide the repeated values marked in the red square? 
And is it possible to use ISFILTERED to hide / columns when clicking on one element under 'Name'?


Hoping for a speedy reply, thanks 🙂 
Best regards,

Roop

5 Replies

  • Hi  Anonymous, you can conditionally format "Values" section (highlighted in violet below).

    The way to do it is by using INSCOPE() function, which checks whether a specific element of hierarchy is currently selected or not (use NOT INSCOPE() to flip around the behavior). Here is the example of DAX code:
     

     

    Document Date = 
        IF( 
            ISINSCOPE( Table1[Column 1] ) && NOT ISINSCOPE( Table1[Column 2] ),
            SELECTEDVALUE( Table1[Column 3] ),
            BLANK()
        )

     

     

    You can't yet apply conditional formatting to column/row headers (all levels will have the same selected colour).
    I hope it helps! Good luck with your project 🙂 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello,

      I'm still new to Power Bi, so I have no idea what you're talking about, sorry.
      I don't know where to write the DAX code or how to format values.

      Could you maybe elaborate a little please? 

      Best regards,

      Roop

  • Anonymous, in such case I stongly suggest you to take some online course on PowerBI. You need to have a basic understading of the tool (transformation with Power Query, data modelling, creation of measures with DAX and data visualization). PowerBI is a powerful tool, but requires knowledge of foundation to benefit from it.

     

    Some of the things are not so immediate as they are in Excel. Unfortunately, the one you're asking about is one of them.

    Take your time, learn the basics and read my answer once again. In case you'd have questions after, feel free to tag me again 😉 Good luck with your journey, you're on the right way!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Based on the description, you should select the table name and create a new measure to enter the Sergii24 provided DAX formula above.

    Then, drag the measure into the matrix visual Values.

    You can also view the following to learn more information.

    Learn DAX basics in Power BI Desktop - Power BI | Microsoft Learn

    ISINSCOPE function (DAX) - DAX | Microsoft Learn

    Create a matrix visual in Power BI - Power BI | Microsoft Learn

    Tutorial: Create your own measures in Power BI Desktop - Power BI | Microsoft Learn

     

    Best Regards,

    Wisdom Wu

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello,

      Not quite wht I was looking for but it's close and I can possibly use it to get the result I want.

      Thank you for taking the time to  answer my question. 

      I'll accept it as a solution.

      Appreciate it ✌️

      Best regards,

      Roop