The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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:
Blank graph with x-axis and y-axis selected.
Any guidance is very much appreciated, thank you.
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!
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.
@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
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
but not when that same value is selected in the parameter?
I am having the same issue, did you ever figure out how to do this?