Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

How to show different column values in y-axis based on slicer choice while x axis remains stable

Hey everyone,

 

I am confronted with a problem, to which I could not really find an appropriate solution.  I will try to simply my question.

 

So I have a table with the following columns: 

Country,

Month,

Expenditure, 

CountryExpCummu. (This is a DAX column where I calculate the monthly cummulated sum of Expenditure of each country),

AllExpCummu. (This is a DAX column where I calculte the monthly cummulated sum of Expenditure of all the countries)

 

Then, I want to visualize these data in bar chart and here is the function I want it to fulfill:  
I add the [Country] column as the slicer,  [Month] as the x axis . When I choose a specific country in the slicer, the y axis will show the maximum of the values in [CountryExpCummu.] in each month ;  When I don't choose any country in the slicer, the y axis will correspondently show the maximum of values in [AllExpCummu] in each month.

 

(Here is the thing that might need attention:  Since each country has multiple expenditures in each month, therefore, when I calculate the cummulated sum of each country in [CountryExpCummu.] as well as of all countries in [AllExpCummu.] , some same values will be shown in every line that contains the same country and month. That is why I mention that I want the y axis only to show the maximum of relevant value of each country in each month, not the sum)

 

Would anyone be kind enough to provide me with an solution? This is sort of like "dynamically changing the axis value" problem but not exactly the same since the x axis remains the same, which shows [Month] from beginning to the end while y axis switches dynamically between two columns based on the choice in the slicer.

3 REPLIES 3
Anonymous
Not applicable

Hi everyone,

 

I think the main bottleneck here is how to realize the function where the y-axis could vary between different values from different columns based on the action on the slicer  while keeping the x-axis stable 

Uzi2019
Super User
Super User

Hi @Anonymous 
If you want dynamic slicer please check this video

https://www.youtube.com/watch?v=-nqEv2YXLsU

 

https://www.youtube.com/watch?v=nWgPynP9XDM

 

I Hope above video would help you to solve your issue!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Anonymous
Not applicable

I'm sorry this is not exactly what I need but thanks anyway😉

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors