Forum Discussion

Fusilier2's avatar
Fusilier2
Helper V
1 year ago
Solved

Dynamic bar color

Hope somebody can help with this? I have a slicer and a clustered bar chart.   The slicer shows a list of departments and the bar chart shows the results for each department of a survey question. ...
  • danextian's avatar
    danextian
    1 year ago

    Using the same disconnected table but with the logic in the measure reversed

    Disconnected Total Revenue = 
    CALCULATE (
        [Total Revenue],
        TREATAS ( VALUES ( 'Disconnected Category'[Category] ), Category[Category] )
    )
    
    Disconnected Conditional Bar Color = 
    IF (
        SELECTEDVALUE ( 'Disconnected Category'[Category]  )
            IN VALUES ( Category[Category] )
                && ISFILTERED ( Category  ),
        "red"
    )
    

    Please see the attached pbix