Forum Discussion

Kailashw's avatar
Kailashw
Frequent Visitor
8 years ago
Solved

Transpose Rows and Columns in Matrix and summarize into new table (view)

Hi, I Have Data as shown below

 I need to get the following output

 any suggestions?

 

  • dilumd i did do that, using following querry. but the result i see is in column manner .. while i need it in row by row

    New Table = SUMMARIZE('Sample Data',"Total Salary",SUM('Sample Data'[Salary]),"Total Tax",SUM('Sample Data'[profession tax]))

     

    Output now is  

     

    Out Put

     

    While what  i want is here 

     

    Expected output

  • Hi Kailashw

     

    Try these steps

     

    Step # 1: Unpivot the Gross Salary and Tax Columns in Query Editor

     

    You will get

     

     

    Step #2: Drag the Columns to Table Visual

     

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago

    Kailashw

     

    Also in the Query Editor, you can directly add a New Column "Total Salary".

    Then you won't need a MEASURE

     

     

     

8 Replies

  • dilumd's avatar
    dilumd
    Impactful Individual

    Hi Kailashw

     

    Go to Modeling tab and click on "New Table" and then use Summarize function to get a summarize view of your table.

    • Kailashw's avatar
      Kailashw
      Frequent Visitor

      dilumd i did do that, using following querry. but the result i see is in column manner .. while i need it in row by row

      New Table = SUMMARIZE('Sample Data',"Total Salary",SUM('Sample Data'[Salary]),"Total Tax",SUM('Sample Data'[profession tax]))

       

      Output now is  

       

      Out Put

       

      While what  i want is here 

       

      Expected output

      • Zubair_Muhammad's avatar
        Zubair_Muhammad
        Community Champion

        Hi Kailashw

         

        Try these steps

         

        Step # 1: Unpivot the Gross Salary and Tax Columns in Query Editor

         

        You will get

         

         

        Step #2: Drag the Columns to Table Visual