Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

transpose vertical column to horizontal

Hi,

 

I want to transpose a vertical column to horizontal, but problem is that vertical column is calculated and I have more than one company and product. Sample data and result is like following. I'm ok to add 11 columns. Please advise the formula.

Thank you

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Inside 'Transform Data' you want to look for the options "Pivot Column" or "Unpivot Columns".  In your case it seems you wish to unpivot columns.  In this case you would click the drop down arrow and select "Unpivot Other Columns" to keep your solution data driven.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

      The remainder column is calculated, not in Power Query. And I have more than one company and product. Pivot doesn't work here

      • Anonymous's avatar
        Anonymous
        Not applicable

        Do you need to precalculate remainder in that case?  Could you write a measure to calculate remainder and then display it on the visual you need?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

      Sample data is like this. M1 C/F and M2 C/F is the new column I want to get.

      Reporting AttributeSales UnitAttributeForecast MonthThis Month FCRemainderM1 C/FM2 C/F
      Car 1AAAMonth 011/1/20242   
      Car 1AAAMonth 012/1/20241122
      Car 1AAAMonth 021/1/20242   
      Car 1AAAMonth 022/1/202412  
      Car 1AAAMonth 031/1/20242   
      Car 1AAAMonth 032/1/202472  
      Car 2BBBMonth 011/1/20242   
      Car 2BBBMonth 012/1/20240222
      Car 2BBBMonth 021/1/20242   
      Car 2BBBMonth 022/1/202412  
      Car 2BBBMonth 031/1/20242   
      Car 2BBBMonth 032/1/202472