Forum Discussion

jonny2615's avatar
jonny2615
New Member
6 months ago
Solved

Remove Secondary columns in Matrix Visual

I have a matrix where each column has two values - how do I remove the S_puts values from only the L_P1 columns? The column of data which I pull from is blank (and will always be blank) for any line that has L_P1

 

 

 

 

 

  • Hi jonny2615 

    That is the expected behaviour - you cannot dynamically hide a measure column when its value is blank. The workaround is to use a disconnected table containing the measure name and reference this disconnected table in a measure. Notice that in the image below, Latin America doesnt have a column for revenue

    Please see the attached pbix.

     

     

4 Replies

  • Hi jonny2615 

    That is the expected behaviour - you cannot dynamically hide a measure column when its value is blank. The workaround is to use a disconnected table containing the measure name and reference this disconnected table in a measure. Notice that in the image below, Latin America doesnt have a column for revenue

    Please see the attached pbix.

     

     

  • Hi jonny2615 

    Generally, Power BI does not offer a native "hide column" feature for matrices like Excel; the structure is relatively rigid, similar to a Pivot Table.

    However, there are workarounds to influence the structure:

    Using Calculation Groups: https://www.youtube.com/watch?v=vMzkX6dHG34

     

    Using a dynamic measure: https://community.fabric.microsoft.com/t5/Desktop/hiding-columns-in-Matrix/m-p/544289

     

    The common factor between these two methods is that a hierarchy must be pre-defined in a side table (disconnected table), combined with a single measure designed to behave according to the specific hierarchy level and column context.

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

  • Simply drag the column border to the left for the speficif column you dont want to see in your visual and disable auto-size column width from the visual settings so that the visual would stay as same.