The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
hi,
I want to highlight the value is greater than the previous value.
Like below
Value | Date | Cost |
Mango | 1/1/2021 | 12 |
Mango | 2/1/2021 | 23 |
Mango | 3/1/2021 | 13 |
Mango | 4/1/2021 | 45 |
Mango | 5/1/2021 | 23 |
is this possible?
thanks,
Solved! Go to Solution.
Hi @Anonymous ,
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" )
)
)
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.
Hi @Anonymous ,
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" )
)
)
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.
@Anonymous , 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")