Forum Discussion

luismolle's avatar
luismolle
Regular Visitor
2 years ago
Solved

Pivot Column to show both different values from same text, not sum

Hello, not sure Im searching it in a wrong way, but I could not find anything related. I have a column I want to pivot, but some text values are equal, and the result Im getting is a sum of both va...
  • edhans's avatar
    2 years ago

    Pivoting automatically groups when the text values are the same, and it also gets rid of nulls. For it to not combine, there needs to be another column that is unique for those records. For example, Lable D is duplicatged, but the dates are different.

     

    when pivoted, I get this:

    However, if I don't have unique dates, say that row 5 in the top table was also 1/4/2023, I get this error:

     

    It is because there is a list of {4,5}  that it is trying not to aggregate (it uses List.Distinct) and it cannot get a distinct value for that cell, so it bombs.

     

    You cannot get two column "D's" though. That makes no sense to Power Query. Or any other database.