Forum Discussion
obriaincian
Resolver I
2 years agoUnpivoting and re-Pivoting creating duplicates
Hi All, I have the below table in Power BI Index Manager First Name Manager Last Name HC Aug-23 HC Sep-23 HC Oct-23 HC Nov-23 HC Dec-23 HC Jan-24...
Ahmedx
Super User
2 years agoshow this step
obriaincian
Resolver I
2 years ago- Ahmedx2 years ago
Super User
everything is correct, but what should not be summed by which column?
- Ahmedx2 years ago
Super User
show next steps
- obriaincian2 years ago
Resolver I
unfortunately i can't show all the columns but these snippets are from the final step
This column shows the sum
Below are the columns that need to be summed, If we take the first row above which returns 13 for the sum, we can see below that the sum should be zero, I think what's happening is that it's summing all columns with a value as I have a column called "FY NU" which has 12 and the index column for this row is 1 which gives us 13
- Ahmedx2 years ago
Super User
pls try this
List.Sum( List.Transform( List.Range( Record.FieldValues(_), MGoM[Index]{0},MGoM[Index]{ List.Count(MGoM[Index])-1}),Number.From))
- Ahmedx2 years ago
Super User
show it