Forum Discussion

sdjpaterson's avatar
sdjpaterson
New Member
6 years ago

Hiding YoY% Column in Matrix

Hi, 

 

I have a simple table with prior year and current year values. I have then used a quick measure to create a year over year % variance.

 

On a matrix, I would like to show the following...

 

Column 1          Column 2         Column 3         Column 4

Customer 1      2019 Sales        2020 Sales        % 2020 v 2019

 

However, when I add in my quick measure for year over year sales, it adds a blank column between columns 2 & 3 where it is trying to calculate variance from 2018 to 2019. This is data we dont have in this query. Is there a way to only show column 4 variance and hide the column circled in red?

 

I am fairly new to Power BI so apologies if I am missing something obvious.

 

Thanks

 

 

5 Replies

    • sdjpaterson's avatar
      sdjpaterson
      New Member

      ok, thanks.

       

      Is there another way of achieving what I would like in another visualisation? To show the vaiance of year over year in a table style format?

       

      Thanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi sdjpaterson, there is a workaround for your issue.

    Click on the matrix visual you've created. Then go to the formatting options for the matrix. Turn off word wrap for column headers, row headers and values. Then turn off auto-size column width. At last, drag the GBP val YOY% inside the year 2019 from right to left, till the column is hidden.

     

    Check if this works.

    • sdjpaterson's avatar
      sdjpaterson
      New Member

      Hi, thanks, this looks like it will work. Great, will give it a go.


      I assume there is a better way to do all this via DAX also, I will look into that aswell.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi sdjpaterson,

    AFAIK, current you can't hide these. (value fields will be expanded base on category field group when you used on matrix visuals)
    You can remove the column field and write multiple measure formulas to different sales years and us them with you measure on values field to prevent these blank parts.

    Regards,

    Xiaoxin Sheng