Forum Discussion
Anonymous
4 years agoNot applicable
How to make X axis dynamic for bar graph
I have a table in Power BI that looks like this -
| ID | FRUIT | COLOR | TASTE | VALUE |
| 1 | Apple | Red | Sweet | 10 |
| 2 | Apple | Green | Sour | 5 |
| 3 | Orange | Orange | Sweet | 20 |
| 4 | Grape | Violet | Sweet | 10 |
| 5 | Banana | Yellow | Sweet | 5 |
| 6 | Grape | Green | Sweet | 20 |
Like Fruits, Color and Taste, I have close to 50 columns, and I want to create a bar chart that dynamically changes X axis (on click of the column name as per user choice) and plots the sum of price as Y value. I tried to achieve this by creating a second table that has all the column names and its attribute combination (like a helper table with 2 columns), but the view created by that method is not working with the slicers present. (e.g. bar chart for X axis= Fruit, filtered for color = Red).
Is there a way to get this done?
TIA.
1 Reply
- lbendlin
Super User
Read about the Field Parameters option that was introduced in May 2022.