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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ValentinMro17
Regular Visitor

How to create a dynamic y-axis on a barchart using field parameters

I have the following problem: 

 

I want to use a barchart to visualize the percentage of defect parts which a production-line did produce within one day. It looks like this:

 

Unbenannt.PNG

 

So currently, I have 2 lines and their percentage amount of defect parts on every date in a table which looks like that:

 

DateM150_146600_defect_percentageM160_146600_defect_percentage
2024-04-180.00.01
2024-04-170.020.005
2024-04-160.0030.008
.........

 

What i want to do, is making the displayed production line "dynamic" which means, i want the user to select which line is shown on the Y-Axis. When the slicer is selected for the line, it should look like that:

 

Unbenannt.PNG

 

So basically, i want the columns to be shown in the bar-chart to be dependend on a slicer and let the user dynamically choose them. 

 

To achieve this, i thought about just using a field-parameter on that, the problem is, the percentage values which need to be plottet are columns, not messaures, so that is not possible. 

 

I deeply researched on the Internet for a way to achieve this, but i was not able to find a solution / workaround. 

 

So if anyone here has had a similar problem before and knows a solution / workaround, I would be realy greatful!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ValentinMro17 , if line using a secondary y-axis, you can use field parameters

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE

 

If want to switch measure based on axis Field parameter

Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

 

You can also consider traditional measure slicer 

 

How to create a Measure Slicer: https://youtu.be/b9352Vxuj-M

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@ValentinMro17 , if line using a secondary y-axis, you can use field parameters

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE

 

If want to switch measure based on axis Field parameter

Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

 

You can also consider traditional measure slicer 

 

How to create a Measure Slicer: https://youtu.be/b9352Vxuj-M

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.