Forum Discussion
sum of max values
- Anonymous10 years ago
Alternative Sum of Max = SUMX(
SUMMARIZE(TableName, TableName[City], "Max Sales", MAX(TableName[Sales])),[Max Sales])
My first formula works on a test table I already had, but it doesn't seem to work right when I typed in your sample table. I can't figure out why that's the case because they both follow a similar pattern, but anyway this second formula works for both.
Anonymous Is late that is why you probably missed it..Wrap MAX() with calculate
Sum of Max = SUMX ( VALUES ( TableName[City] ); CALCULATE ( MAX ( TableName[Sales] ) ) )
On the Total ( no city filters) it sums 3 times the MAX of all table 3x3000
konstantinos I was just looking at this too and missed it :smileyhappy:
However No Excuses for Anonymous :smileylol:
Plus its not really late I think he is in the Eastern Time zone so around 5:30pm
I'm in the Central so 4:30pm here
- konstantinos10 years ago
Memorable Member
- Anonymous10 years agoNot applicable
D'oh! Nesting a CALCULATE inside a SUMX looks so weird to me that I never remember when it's needed. Good catch konstantinos
Sean now, what's the speed performance on the two methods? :smileyhappy: