Forum Discussion
How to highlight maximum and minimum values?
- Anonymous2 years ago
Hi jaythakur32
Based on your needs, I have created the following table.
You can use the following dax to get the result you want.
Measure 2 = var _tab=SUMMARIZE(ALLSELECTED('Table (2)'[area]),'Table (2)'[area], "@sumvalue",CALCULATE(SUM('Table (2)'[value]))) var _max= maxx( _tab,[@sumvalue]) var _min= MINX(_tab,[@sumvalue]) var _area=SELECTEDVALUE('Table (2)'[area]) return SWITCH(TRUE(),sum('Table (2)'[Value])=_max&&_area="a","grey", sum('Table (2)'[Value])=_max&&_area= "b","grey",sum('Table (2)'[Value])=_max&&_area="c","grey",sum('Table (2)'[Value])=_max&&_area="d","grey",sum('Table (2)'[Value])=_min&&_area="a","green", sum('Table (2)'[Value])=_min&&_area= "b","green",sum('Table (2)'[Value])=_min&&_area="c","green",sum('Table (2)'[Value])=_min&&_area="d","green")Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That's pretty straightforward if your data is in the right format (as it seems to be). You need to compare each value agains the min and max value that you get when you apply REMOVEFILTERS(...[Warehouse Code])
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523