Forum Discussion
dofrancis3
Resolver I
1 year agoAvoid duplicates doing the calculations
Dear Colleagues, I would like to request your assistance please ! As you can see in the table below, I have duplicates. How can I proceed to make the calculation (sum) without considering the dupli...
powerbidev123
Solution Sage
1 year agoHi dofrancis3 ,
If the duplicates are not identical across all columns but need to be grouped by Country, Year, and Quarter, use DAX:
SUM_NO_DUPLICATES = SUMX( DISTINCT(SELECTCOLUMNS('Table', "Country", 'Table'[Country], "Year", 'Table'[Year], "Quarter", 'Table'[Quarter], "P1", 'Table'[P1], "P2", 'Table'[P2])), 'Table'[P1] + 'Table'[P2] )
This formula ensures that only unique (Country, Year, Quarter, P1, P2) combinations are considered.
dofrancis3
Resolver I
1 year agoDear powerbidev123 in my case the duplicates are identical across all columns.
So, how can i modifie the DAX.