Forum Discussion

Snagalapur's avatar
Snagalapur
Helper IV
1 year ago
Solved

Conditional colour format Bar chart

Hi All,   Please suggest measure to combine multiple statements of conditional colour format into one, currently my bar chart toggle between 3 options using slicer.   How to use single condition ...
  • v-priyankata's avatar
    v-priyankata
    1 year ago



    Hi Snagalapur 

    Thank you for reaching out to the Microsoft Fabric Forum Community.

    Can you try below DAX


    Bar Chart Color Format =
    VAR SelectedKPI = SELECTEDVALUE('KPI''s'[KPI's]) -- This refers to the field parameter slicer
    VAR KPIValue =
    SWITCH(
    SelectedKPI,
    "Act v. Bud", [Act v. Bud (Top 10 Bar chart)],
    "Act v. Fcst", [Act v. Fcst (Top 10 Bar chart)],
    "Act v. LY", [Act v. LY (Top 10 Bar chart)],
    BLANK()
    )
    RETURN
    IF(KPIValue < 1, "#FF0000", "#00CC66")



    If this information is helpful, please “Accept as solution”  to assist other community members in resolving similar issues more efficiently.
    Thank you.