Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Mumin192
Helper I
Helper I

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

 

Mumin192_1-1672217388887.png

 

 

5 REPLIES 5
FreemanZ
Super User
Super User

hi @Mumin192 

 

How is [TotalPRF] definded?

TotalPRF = CALCULATE(COUNT(PRF[INTNR]))
amitchandak
Super User
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.

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

@amitchandak will you be able to check the file?

Thanks

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.