Forum Discussion

aprilysxxx's avatar
aprilysxxx
Regular Visitor
2 years ago
Solved

Conditional formatting the clustered column chart with multiple measures

Hi everyone,   I am trying to conditional format the clustered column chart by the value in each bar:  5% or More = Red 2% to 4% = Yellow 2% or Less = Green   I know I am having multiple...
  • v-weiyan1-msft's avatar
    2 years ago

    Hi aprilysxxx ,

     

    From your description, please try the following steps:

    My Sample:

    1.Please try code as below to Create a X-axis table.

    X-axis = 
    DATATABLE(
        " X axis",STRING,
        "Order",INTEGER,
        {
            {"Average",1},
            {"Clothing",2},
            {"Food",3},
            {"Furniture",4}
        }
    )
    

    2. Use the following code to create a measure-Value_Measure.

    Value_Measure = 
                SWITCH(MAX('X-axis'[ X axis]),
                      "Average",[_Average],
                      "Clothing",[_Clothing],
                      "Food",[_Food],
                      "Furniture",[_Furniture]
                    )

    3.Select your visual object and do the following in the Visualizations pane.

    Result is as below.

    Best Regards,

    Yulia Yan

     

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