Forum Discussion

yashwant101's avatar
yashwant101
Helper III
2 years ago
Solved

Dynamic Color for Multi-Bar Bar Chart

Hi all,   I have a use case where I have 2 different categories for each x axis value in a bar chart: Is there a way to keep different color combination for Bangaluru and a different one for...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi yashwant101 ,

    I agree with what Uzi2019 said!
    But I can give you a workaround.
    Here is my sample data:

    Then I use these DAXs to create two measures:

    Bangaluru = SUMX(FILTER('Table', LEFT('Table'[Name], 9) = "Bangaluru"), 'Table'[Value])
    Chennai = SUMX(FILTER('Table', LEFT('Table'[Name], 7) = "Chennai"), 'Table'[Value])

    Then create the Clustered Column Chart: