The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
So currently, I have 2 lines and their percentage amount of defect parts on every date in a table which looks like that:
Date | M150_146600_defect_percentage | M160_146600_defect_percentage |
2024-04-18 | 0.0 | 0.01 |
2024-04-17 | 0.02 | 0.005 |
2024-04-16 | 0.003 | 0.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:
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!
Solved! Go to Solution.
@Anonymous , 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-fc4095ae9afd
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
@Anonymous , 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-fc4095ae9afd
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
Hello amitchandak,
Thanks for sharing this.
I used the field parameter to create a measure slicer. I have a matrix visual.
However, when I put the parameter into the Values field of the Matrix, no matter what I select in the slicer, nothing in the table shows up. But if I put it in the row or column field, it functions well. Do you have any experience with that and do you know why?
Thank you so much,
Jason
User | Count |
---|---|
78 | |
77 | |
38 | |
31 | |
28 |
User | Count |
---|---|
106 | |
98 | |
55 | |
49 | |
47 |