Forum Discussion
karo
1 year agoAdvocate V
Dynamic Max for X axis for multiple charts
Hi, Can you help me create a measure to dynamicaly customize Max Value for X axis, please? It should cover all scenarios below. 1. Max Value for all 3 charts should be set up to 275. 2...
- 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.
johnt75
1 year agoSuper User
You can get the max value across all category / city combinations with
Max of all categories =
VAR BaseTable =
ADDCOLUMNS (
SUMMARIZE ( ALLSELECTED ( Data ), Data[City], Data[Category] ),
"@sales", CALCULATE ( SUM ( Data[Sales] ) )
)
VAR Result =
MAXX ( BaseTable, [@sales] )
RETURN
Result