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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jbenson
Helper III
Helper III

Conditional Formatting

Hello i am wanting to highlight what year we brought in the most grain and what year was the lowest based on location. i have added the formula i am trying use. i get an error if i use bushel for the VAR CURRENTVAL = BUSHEL, i am not sure what i am doing wrong any help would be greatly appriciated.

 

thank you 

 

MIN OR MAX = VAR VALUESDISPLAYED = CALCULATETABLE(ADDCOLUMNS(SUMMARIZE('TOTAL HARVEST BUSHEL','TOTAL HARVEST BUSHEL'[CROP],'TOTAL HARVEST BUSHEL'[LOCATION]), "@Amt", 'TOTAL HARVEST BUSHEL'),ALLSELECTED() ) VAR MINVAL = MINX ( VALUESDISPLAYED, [@Amt])VAR MAXVAL = MAXX (VALUESDISPLAYED, [@Amt] ) VAR CURRENTVAL = [BUSHEL], VAR RESULT = SWITCH(TRUE(), CURRENTVAL = MINVAL,1, CURRENTVAL = MAXVAL,2, ) RETURN RESULT
 
 
 
2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @jbenson ,

 

Sorry, measure is related to the current row context. It is difficult to understand the problem only by looking at the formula.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I have a column of Locations and each row has a total bushel amount based on each year. My goal is to have the highest amount highlighted per location. I would like to do that with conditional formatting 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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