Forum Discussion

mundy727's avatar
mundy727
Frequent Visitor
1 year ago
Solved

Conditional Formatting with static and dynamic data

Hi Power BI Community,   Im currently working with 2 datasets and i have a relationship between the 2, based off of individual name. Ive outlined the tables which make up the columns shown in the t...
  • Irwan's avatar
    1 year ago

    hello mundy727 

     

    i dont know how you pulled Load and Capacity, so i am not sure what form Load and Capacity are (column or measure).

     

    but here is one of many ways to do conditional formating. please check if this accomodate your need.

     

    1. If Load and Capacity are column, create new measure with following DAX. you can change the color code based on your requirement.

    Color Palette = 
    var _Capacity = SELECTEDVALUE('Table'[Recruiter Capacity])
    var _Load = SELECTEDVALUE('Table'[Total Req Load])
    Return
    IF(
        _Load>=_Capacity,
        "#FF0000"
    )
    2. Pick one or more columns you want to do conditional formating from that down-arrow (you need to do the same step for other column). then go to conditional formating, then choose what kind of formating you want (i used background in this case).

    3. choose Field Value, then select the created measure from before.

    4. here is the result

     

    if Load and Capacity are measure, then change the DAX into this and the rest are exactly the same.

    Color Palette = 
    IF(
        [Load]>=[Capacity],
        "#FF0000"
    )

     

    Hope this will help.

    Thank you.