Forum Discussion

sangeethray's avatar
sangeethray
Frequent Visitor
3 years ago
Solved

Pivot Column Giving Unexpected Result

I have done pivot column for the table in the first image for column session type. In the result for date 01/07/2001 the result is showing incorrect sum for the column rating 'comm' . What might be the reason ? This is the mQuery used. 

= Table.Pivot(#"Grouped Rows", List.Distinct(#"Grouped Rows"[#"Session Type"]), "Session Type", "Sessions", List.Sum)
mdsmith1 

 

I have done pivot column on this table for session type.In the result for date 01/07/2001 the result is showing incorrect sum for the column rating comm

  • Hi sangeethray,

     

    Pivoting does not summarise the rest of the column, rather it groups it.

    If you want to retain similar numbers (to be able to summ them later) you can add an index column before pivoting. This will preserve all rows.

     

    Cheers,

    John

1 Reply

  • jbwtp's avatar
    jbwtp
    Memorable Member

    Hi sangeethray,

     

    Pivoting does not summarise the rest of the column, rather it groups it.

    If you want to retain similar numbers (to be able to summ them later) you can add an index column before pivoting. This will preserve all rows.

     

    Cheers,

    John