Forum Discussion
SUMX Group By Multiple Categories
- 1 year ago
FreemanZ Kedar_Pande I did it! This works!
TotalHoursByIDandMonth2 = CALCULATE( SUMX('BCP (2)',[TotalHoursClosed]), REMOVEFILTERS('BCP (2)'),VALUES('BCP (2)'[UniqueID0]),VALUES('BCP (2)'[ColumnMonthExtract]))Could someone mark this as a solution and give a kudos, since I answered my own question? Please see Using ALLEXCEPT versus ALL and VALUES - SQLBI for reference. Hope it helps someone.
I was trying to do this in a measure, so when I use this I get sum totals by ID, but doesn't take into consideration the date.
I tried using the column, but I get an error "A circular reference was detected" Any idea on that?
- BrianNeedsHelp1 year ago
Resolver I
I can't use SUM. "Parameter is not the correct type".
- FreemanZ1 year ago
Super User
hi BrianNeedsHelp ,
try like:
TotalHoursByIDandMonth =CALCULATE([TotalHoursClosed],ALLEXCEPT('BCP (2)', 'BCP (2)'[UniqueID0],'BCP (2)'[DateConversion]))- BrianNeedsHelp1 year ago
Resolver I
FreemanZ Kedar_Pande I did it! This works!
TotalHoursByIDandMonth2 = CALCULATE( SUMX('BCP (2)',[TotalHoursClosed]), REMOVEFILTERS('BCP (2)'),VALUES('BCP (2)'[UniqueID0]),VALUES('BCP (2)'[ColumnMonthExtract]))Could someone mark this as a solution and give a kudos, since I answered my own question? Please see Using ALLEXCEPT versus ALL and VALUES - SQLBI for reference. Hope it helps someone.