Forum Discussion

jcastr02's avatar
jcastr02
Post Prodigy
2 years ago
Solved

Transform / Unpivot Columns

Hello I have below 4 columns with data but need to unpivot somehow to get desired results.  I 've tried all the possible unpivot actions but I can't get it work.  Any thoughts?   Current: Store...
  • Ritaf1983's avatar
    2 years ago

    Hi jcastr02 
    If it is for visualization, you just need to use a Hierarchical matrix :

    Note that I added conditional column from PQ, for sorting in the needed order these columns

    Pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

  • Ritaf1983's avatar
    Ritaf1983
    2 years ago

    Hi jcastr02 It is not an efficient way to work, but yes it is possible

     

    It is a lot of steps :

    You need to duplicate the tables twice, to pivot one table for average Rx

    Second for Avg Rx and to merge these pivoted tables.

    The updated pbix is attached, you can follow my steps.

    **I didn't format column names, you can modify them according to your needs.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly