Forum Discussion
Highlight the max value in a chart
Hello
I'm trying to highlight the maximum count by age in my data
I used this measure
Max Value =
var allthedatesused = ALLSELECTED(prf[Age])
var themaxvalue = MAXX(allthedatesused, [TotalPRF])
return
IF([TotalPRF] = themaxvalue,"#000000")
it worked, but I had to create a table with all age ranges but sorted by range, but when I link the sort to the age table, it doesn't work
Max Value2 =
var themaxvalue = MAXX(ALL(age[Age]), [TotalPRF])
return
IF([TotalPRF] = themaxvalue,"#000000")
The first chart is using age from the original table, while the 2nd chart is using the ages table
Any idea how to fix the issue with the 2nd chart?
Thanks
5 Replies
- amitchandak
Super User
Mumin192 , use allselected in second case also
Max Value2 =
var themaxvalue = MAXX(ALLSELECTED(age[Age]), [TotalPRF])
return
IF([TotalPRF] = themaxvalue,"#000000")
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- Mumin192
Helper I
I turned it into allselected and it didn't work
You can find in the the sample file in the link
Thanks
https://drive.google.com/file/d/13S9q0S0oWovbeIbM0lwFLfDgsJFPCsz3/view?usp=sharing
- Mumin192
Helper I
amitchandak will you be able to check the file?
Thanks
- FreemanZ
Super User
- Mumin192
Helper I
TotalPRF = CALCULATE(COUNT(PRF[INTNR]))