Forum Discussion

BulldogTom's avatar
BulldogTom
New Member
2 years ago
Solved

Conditional Formatting to Conditional Column if Null Field

Hello! I would like to apply conditional formatting to a conditional column I created in Power BI Desktop but I'm stumped. I have a table with four columns.  The RTA_Current column is conditional and...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  BulldogTom ,

     

    Here are the steps you can follow:

    1. Create measure.

    Color =
    var _datediff=DATEDIFF(MAX('Table'[RTA Current]),TODAY(),DAY)
    return
    IF(
        MAX('Table'[RTA Actual])<>BLANK(),"gray",
        IF(
            MAX('Table'[RTA Actual])=BLANK()&&_datediff<30,"yellow",
            IF(
             MAX('Table'[RTA Actual])=BLANK()&&MAX('Table'[RTA Current])<TODAY(),"red"  
    )))

    2. [[RTA Current] – Conditional formatting – Background color.

    3. Result:

    Best Regards,

    Liu Yang

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

    Conditional Formatting to Conditional Column if Null Field.pbix78 KB