Duplicate Values

I need help and advise with the following problem:
Column Income A Column Payment B Column Payment C Column Paymen D
100 20 60 20
When UnPivot columns
Column A Column BCD
100 20
100 60
100 20
Column A duplicates values and when calculating shows 300 Income and a correct result of payments
how can I fix this problem???
Thank you for your help

Octavio,

The key here is that you typically wouldn’t unpivot on income, but on something like client or employee as the row header, like this:

Initial:

image

Unpivoted:

Now it’s easy to sum amounts by employee and/or transaction type.

image

If you don’t have an employee, client, or transaction column to serve as your row header, you can just add an index column as your first column in Power Query, and unpivot on that

I hope this is helpful.

1 Like

Great , thank you so much…
Yes the answer will help me absolutely, again thank and have a wonderful day!!!

One more quick question then you used sumx right?

@Octavio,

No, just a simple measure of Total Amount = SUM( ‘Transactions’[Amount] ), letting the row and column context of the matrix do the proper filtering.

  • Brian

Hi @Octavio, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box. Thanks!