Forum Discussion

gustavo80's avatar
gustavo80
Helper III
6 years ago
Solved

Pivot date problem

Hi everyone! I'm pretty sure that my problem could be solved through pivot or unpivot feature, but I encountered a problem that I wasn't able to fix.   My dataset looks like:   installs ...
  • MFelix's avatar
    6 years ago

    Hi gustavo80 ,

     

    You must use the Unpivot column in the query editor.

     

    • Add an index column
    • Select the columns Installs, signups, players and session.
    • Unpivot
    • Get 4 Columns
      • Date
      • Index
      • Attribute
      • Value
    • Add a custom column:
    if[Attribute] = "installs" then 1 else
    if[Attribute] = "signups" then 2 else
    if[Attribute] = "players" then 3 else
    4
    • Sort the Date by the last index column and the attribute by the previous column you have created
    • Make you matrix with the following setup:
      • Rows: attribute
      • Columns: Date
      • Values: Values

     

    Check PBIX file attach.