Forum Discussion
Dynamic Max for X axis for multiple charts
- 1 year ago
Ahh I didn't know the structure of your data so guessed.
Highest city =CALCULATE(MAXX(SELECTCOLUMNS('Table', [Category]),MAXX(SELECTCOLUMNS('Table',[City]),[sum city sales] )),all('Table'[Category]))Change the Inner MAXX to SelectColumn(table,city) that will do the calculation per city instead of per row.
Hi karo
Use a nested MaximumX function.
So for each Category I want the MaxX of their Cities MaxX.
File attached.
Edit: I agree the above SmallMultiple solution is more scalable!
Hi SamWiseOwl Thank you for reply. Please correct me if I am wrong, but your idea returns the value for record with highest Sales per City, not the highest Sales per City as a Sum of Sales per City what I need.
- SamWiseOwl1 year agoSuper User
Hi karo
Did you open the attached file?
It appears to work for each given scenario
275 for all regions
region 1: 75Region 2: 275
- karo1 year agoAdvocate V
SamWiseOwl yes, I opened it. It was really helpful that you attached the file with the solution. However, please split the 275 in the source table into for example 250 and 25 and then you will see what I mean.
- SamWiseOwl1 year agoSuper User
Ahh I didn't know the structure of your data so guessed.
Highest city =CALCULATE(MAXX(SELECTCOLUMNS('Table', [Category]),MAXX(SELECTCOLUMNS('Table',[City]),[sum city sales] )),all('Table'[Category]))Change the Inner MAXX to SelectColumn(table,city) that will do the calculation per city instead of per row.