Forum Discussion

sbarnhill75's avatar
sbarnhill75
Frequent Visitor
5 years ago
Solved

Check if value within spec limit

Hello -  I have a 'Product' table with all of the products and then a column for their [Min Temperatures] and another column of [Max Temperatures].  Between the min and max temps is an acceptable ra...
  • sbarnhill75's avatar
    sbarnhill75
    5 years ago

    This is what we ended up getting to work and maybe it will be helpful to someone else.

    =
    VAR MAXVal = IF(ISBLANK(RELATED('Products'[PR_MAX_Temp])), 10000, RELATED('Products'[PR_MAX_Temp]))
    RETURN
    IF(
    ('Details'[Temperature]) > MAXVal, "#FF0000",
    IF((('Details'[Temperature]) < RELATED('Products'[PR_MIN_Temp])), "#0000FF", "#198c19"))