Forum Discussion

mterry's avatar
mterry
Helper V
8 years ago
Solved

Creating columns from row values

I tried using unpivot, but that doesn't seem to be working (or I'm not using it correctly).  Here's a description of my issue:

I have a column with many company divisions, another column with region the division covers, and a third column wiht the revenue. There is overlap between the divisions and regions. What I would like to do is convert this table so that there is one row per division, and 12 columns - one for each region - the regional columns contain the revenue data, and if a division doesn't operate in that particular division I'm fine with a $0 value or N/A. I thought the format was good for PowerBI, but I've been asked to put this data in a table/matrix where the columns are the regions, but can be sortable by each particular region. If that's do-able now and I'm misunderstanding please let me know.  

  • Hi,

     

    I dont think that is possible in a matrix visual.  In a matrix visual, you can sort by the Grand Total column (not by individual columns).

8 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi mterry,

     

    The Matrix will be very helpful in your scenario. 

    1. Do you want a calculated table?

    2. What kind of sort do you want?

     

    Best Regards,

    Dale

    • mterry's avatar
      mterry
      Helper V
      I dont need any calculations, i just want the ability to sort by different columns
      • v-jiascu-msft's avatar
        v-jiascu-msft
        Microsoft Employee

        Hi mterry,

         

        Can you show an example and a sample data? You can sort it as the snapshot shows.

        Creating_columns_from_row_values

         

        Best Regards,

        Dale