Forum Discussion

raviqul's avatar
raviqul
Frequent Visitor
5 years ago
Solved

How To transform table columns into matrix

Hi Power BI Experts,   I'm trying to create a matrix like a picture below    From a table with format like this :    well i already try to utilize pivot-unpivot column function and ...
  • mahoneypat's avatar
    5 years ago

    You can do this in the query editor.  Since you shared an image of your table and not something easily pasted, specific M code isn't given.  However, these are the steps:

     

    1. Select your project column, right click and choose "unpivot other columns"

    2. Select the new Attribute column and in the ribbon choose split by and enter a space (and do it only at the first delimiter)

    3. Rename your columns to what you want

    4. Use the column that has Revenue, Cost, Net Income on rows in a matrix visual.  Put the column with Actual To Date, etc. in for columns, and put the Value column in the Values area with a Sum aggregation

     

    Regards,

    Pat