Forum Discussion
Measure for conditional formatting
MsWhyte , Not very clear
a color measure like below, this can be used in conditional formatting using filed value option
if( max('Inv Producto'[ExpDate])<= today() + selectedvalues(DiasAntesDeExpirar[Value]) && max('Inv Producto'[ExpDate])>= today() , "Red", "Green")
Sorry if I was not clear. My color formatting does what it is supossed to do, but I made a mistake calculating the expiration dates, I tried with SUM and AVERAGE but that number is not what I want. Example if I have 500 products that expire next week, then 500 that expire in 3 months, then the value will not be highlighted because the AVG time is a month and a half and that is already higher than the 7 day value I want to look for.
How could I make a measure to achieve that?
- V-lianl-msft4 years agoCommunity Support
Hi MsWhyte ,
I am not clear about your data model and the logic of calculation. Please refer to this blog to describe your problem:
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.