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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic Y Axis Using Parameter

Hello,

I'd like to create a dashboard containing a bar chart with a user-selected y-axis. I've created a parameter with a slicer on the page that allows user-selection of the variable. I have that parameter listed in the y axis section for the bar chart, but my chart appears blank. It feels like there is a step missing. The graph does show a result when I put the parameter in the x-axis and my intended x-axis value in the y-axis, but this of course is not the data I want to display.

I am hoping to have the user select from the options below, and the graph to return this data disaggregated by two columns: local vs. international. 

Parameter slicer displayed on the page: 

davidbernstein_0-1684692201932.png

 

Blank graph with x-axis and y-axis selected.

davidbernstein_2-1684692356714.png

 

Any guidance is very much appreciated, thank you.

6 REPLIES 6
rossholmberg
New Member

I've arrived here late, but in case this helps anyone I've found a solution. Basically the issue is that the field parameter doesn't know how to aggregate the column. When you plot the column directly there will be an associated aggregate function (eg sum), but when you select that same column via a field parameter Power BI doesn't seem to recognise that. The way I found around it was to make a new measure for each of the columns, which includes the aggregation eg `tonnes_sum_measure = sum(table[tonnes])`, then have the field parameter reference those measures instead of the columns. It worked for me, so hope it can help someone else too!

I realised this would work after watching this video from Guy In A Cube:
Dynamic X and Y Axis in Power BI visuals? Yes please!

roman154807808
New Member

The solution is actually pretty simple, for my knowledge y-axis always uses aggregated values so u just need to create parameter with aggregated measures instead of just table columns.

amitchandak
Super User
Super User

@Anonymous , If you have created this on the column, this needs to be on the x-axis. This on measure , it can be on y-axis(Value axis, assumed column bar)

 

refer if needed


Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting
: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks very much for your reply. I suppose what I don't understand is why it works when I have my y-axis value selected normally from the 'Data' panel 

davidbernstein_3-1684766971927.png

 

 

but not when that same value is selected in the parameter?


 

davidbernstein_2-1684766940432.png

 

Me looking for solution too

I am having the same issue, did you ever figure out how to do this?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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