Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

listing two columns under one sub column

For a table like below

Name

Physics

Maths

Vikas

88

90

Aakash

85

97

Ravi

89

91

I want Both Physics and Math to be under one column as “ Subject” as sub column. How can it be done?

 

  • Hi Anonymous,

     

    Yes, you can achieve this by adding a new table like below. And other parts are like RajatJaiswal's solution. Please check out the demo in the attachment.

    Class                                                                   Course

    Subject Physics
    Subject Maths

    listing_two_columns_under_one_sub_column

     

    Best Regards,

    Dale

5 Replies

  • RajatJaiswal's avatar
    RajatJaiswal
    Frequent Visitor

    Use unpivot feature 

    = Table.UnpivotOtherColumns(#"Changed Type", {"Name"}, "Attribute", "Value")

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Rajat , somehwat like this:

       

       

       

       

       Is this possible?

      • RajatJaiswal's avatar
        RajatJaiswal
        Frequent Visitor

        Anonymous

        If I understand correctly after reviewing your picture. I don't think it is possible. As it is columnar data so column physics & Maths should be different but if you want to show a report in power BI then we can think of it. Please, share what exactly you need and is it report view or data source table.