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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
BS_03_22
Frequent Visitor

HighLight the value if greater then previous value

hi,

I want to highlight the value is greater than the previous value.

 

Like below

ValueDateCost
Mango1/1/202112
Mango2/1/202123
Mango3/1/202113
Mango4/1/202145
Mango5/1/202123

 

is this possible?

 

thanks,

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @BS_03_22 ,

 

You can try below formula:

M_ =
VAR previous =
    CALCULATE ( MAX ( 'Table'[Cost] ), 'Table'[Date] < MAX ( 'Table'[Date] ) )
RETURN
    (
        IF (
            previous = BLANK (),
            "black",
            IF ( MAX ( 'Table'[Cost] ) > previous, "red", "black" )
        )
    )

vhenrykmstf_1-1657100295350.png

 

vhenrykmstf_0-1657100281528.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @BS_03_22 ,

 

You can try below formula:

M_ =
VAR previous =
    CALCULATE ( MAX ( 'Table'[Cost] ), 'Table'[Date] < MAX ( 'Table'[Date] ) )
RETURN
    (
        IF (
            previous = BLANK (),
            "black",
            IF ( MAX ( 'Table'[Cost] ) > previous, "red", "black" )
        )
    )

vhenrykmstf_1-1657100295350.png

 

vhenrykmstf_0-1657100281528.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

amitchandak
Super User
Super User

@BS_03_22 , Create a new measure and use that in conditional formatting using field value option

 

new measure =
var _max = maxx(filter(allselected(Table), Table[Value] = max(Table[Value]) && Table[Date] < max(Table[Date])), Table[Date])
return
if(maxx(filter(allselected(Table), Table[Value] = max(Table[Value]) && Table[Date] =_max ), Table[Cost]) = max(Table[Cost]) , "Red", "Black")

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.