Forum Discussion

WayneRoseberry's avatar
WayneRoseberry
New Member
9 years ago
Solved

How to create new table that pivots columns based on dynamic values in existing column

I have a table that looks like this:

 

FailureAudiencehits
123456Team100
123456Insiders230
445632Team25
445632Insiders100
445632Outsiders332

 

And I want to create a new table that looks like this:

 

FailureTeamInsidersOutsiders
123456100230 
44563225100332

 

How do I do that? I can do it easily enough in a page view via the UI, but cannot figure out how to make a table pivoted on columns this way.

  • A co-worker helped me figure out the solution.

     

    I used a Summarize operation, and then on the calculated column, did a double filter. The insider FILTER operation matches all rows to the current Failure via an EARLIER operator. The outer FILTER then matches all rows where the "Audience" field equals a specific value. It isn't quite dynamic (I am hard coding to look for specific values in the Audience column, which in my case are a finite set), but it gets the job done.

3 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi WayneRoseberry,

     

    In Query Editor mode, choose the [Audience] column, click "pivot column" option under Transform tab.

    Best regards,
    Yuliana Gu

    • WayneRoseberry's avatar
      WayneRoseberry
      New Member

      Thanks. The data in question is in a table, not a query, so the query editor is not available.

  • A co-worker helped me figure out the solution.

     

    I used a Summarize operation, and then on the calculated column, did a double filter. The insider FILTER operation matches all rows to the current Failure via an EARLIER operator. The outer FILTER then matches all rows where the "Audience" field equals a specific value. It isn't quite dynamic (I am hard coding to look for specific values in the Audience column, which in my case are a finite set), but it gets the job done.