Forum Discussion

Sab's avatar
Sab
Helper V
7 years ago

Help with Pivoting needed

Hello,

 

I have a license log file, which among other columns, has Date and Status coulmns, see attached. 

 

When I pivot these and I choose to not Aggregate I get the error: "Expression.Error: There were too many elements in the enumeration to complete the operation."

 

What to do in order to have two columns: IN and OUT having all respective dates in Rows?

 

Thank you!

Sabedin

8 Replies

  • How did you apply pivot? You have to first click on the Status column, select Transform->Pivot Column, give Values as Date and Aggregate as Don't Aggregate. This should ideally work.

    • Sab's avatar
      Sab
      Helper V

      Thanks for your reply. I know how to Pivot (just like your steps), but as I explained it returns an error. 

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Sab,

     

    To avoid above error, you could add an index column first, then, pivot table. But, as Ashish_Mathur said, how to deal with the multiple records on each day, please show us your desired output.

     

    Regards,

    Yuliana Gu

    • Sab's avatar
      Sab
      Helper V

      Using istructions from video above, I was able to create the ouput like this:

       

       

      This is OK, but I lost information contained in other columns, therefore that solved my problem partially. 

       

      Ideally I would like Out and In columns, along with other columns that I have (not provided in sample dataset).

       

      Thanks