Forum Discussion

lg1551's avatar
lg1551
Resolver II
3 years ago
Solved

Dynamic Y-Axis on Stacked Bar Chart?

It looks as if my post is gone from 2 days ago. I don't see it in my history either.   I have a stacked bar chart that I want to dynamically change the Y-Axis on.   At the top of the page I have ...
  • olgad's avatar
    3 years ago

    Hi, you need to get inventive here.
    1. Duplicate your original table
    2. Group it by Region and Sum of Sales

    3. Duplicate the region column, rename it to Location. Add a custom column isregion simply writing 1 

    4. Append this table to the original table

    5. Then write a calculation: whatever you are counting/displaying there, i took sales as an example

     

    Sales= if(IsFiltered('Table'[Region]), Calculate(Sum('Table'[Sales]), 'Table'[isregion]<>1), Calculate(SUm('Table'[Sales]), 'Table'[isregion]=1))
    And here we go

    Let me know if you need further explanation