Forum Discussion
Wresen
Post Patron
6 years agoGet highest value in Graph to use as line
Hi and thanks for reading this. I have a line and stacked column chart and i want to use the highest colum value to use in the line value I want it to be in a measure and the value for the line...
- 6 years ago
HI
I found a solution :
Measure 1:
Max2 = SUM('Table'[Value])Measure 2:Maxx = maxx(VALUES('Table'[Month]);[Max2])Measure 3 (modifid code that i got from v-lionel-msft )Max1 = CALCULATE( [Maxx]; ALLEXCEPT( 'Table'; 'Table'[Item] ); ALL('Table'[Month]))
Wresen
Post Patron
6 years agoHi amitchandak
Thanks so much for the suggestion, but i dont think i works, the max value for Lamp A (in this case) should be a straigh line and the max value is in Feb and is 23 , so the line should be 23 for all months.
And i will have over 1000 items in the total file.
amitchandak
Super User
6 years agoTry with
Max =
var _1 = sumx(filter(table,table[item]="Lamp A"),Table[value])
var _2 = sumx(filter(table,table[item]="Lamp B"),Table[value])
return
max(_1,_2)- Wresen6 years ago
Post Patron
- amitchandak6 years ago
Super User
Wresen , correct the table name at your end. It was Sheet1, last time
- Wresen6 years ago
Post Patron