expiration dates
1 TopicMeasure for conditional formatting
I have a matrix table with the following: Product in rows, Region in columns, Values are the total amount of items we have on stock, and the tooltip shows the location of the product, the specific lot and the lot's expiration date. All records come from table "Inv Producto" I want the matrix to have conditional format to indicate what product of what region has expiration dates in X days (using a What If parameter, I think that's where the issue resides in) so technically the '3597' should be highligted in Red just like the other cells of the table, and when you hover over the value, you can identify which lot is the one about to expire...but it is not being highlighted and those items could be lost in the analysis. Measure for conditional formatting is: Below Threshold color = IF ( AVERAGEA('Inv Producto'[DaysToExpiry]) <= DiasAntesDeExpirar[DaysToExpire Value], "Coral" ) Column DaysToExpiry is: DaysToExpiry=Duration.Days(Date.From([ExpDate])-Date.From(DateTime.LocalNow())). ExpDate is in mm/dd/yy format What If Parameter to define expiration in the next X days: DiasAntesDeExpirar = GENERATESERIES(0, 365, 1) I think the issue is that CDMX is the one that has most products, so the average I am calculating is very high, thus it doesn't meet the criteria for the formatting but I have no idea how to do the calculation to identify each lot's expiration date and format based on that value only. Any help is appreciated!1.1KViews0likes3Comments