Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a table with a Date and sales for each of the 4 State in columns, ie Date, NSW, VIC, QLD, SA. The table looks something like this:
Date | NSW | QLD | VIC | SA |
1/01/2025 | 100 | 90 | 80 | 40 |
2/01/2025 | 110 | 99 | 88 | 44 |
3/01/2025 | 124 | 112 | 99 | 50 |
What I want to the do is create a State Filter slicer in a Power BI chart and allow the user select which state's or states' sales will be displayed on the chart.
Eg, if NSW is selected then the only NSW is displayed:
But if NSW and QLD is selected then 2 lines are displayed on the chart:
I'm hoping this is possible so to save me the trouble of having to transpose the 4 states measure columns into a state dimension column and a sales measure column.
Solved! Go to Solution.
Hi @IB_rewoP
If that is your raw data then you will need to unpivot it in the query editor. Select date then Unpivot other columns
Hi,
Drag State to the legend well of the Line chart.
Hi @IB_rewoP
If that is your raw data then you will need to unpivot it in the query editor. Select date then Unpivot other columns
I don't think that will cause the chart to only display one line even if I choose both NSW and QLD? I need to display 2 lines in the chart if 2 states are selected, 3 lines on the chart if 3 states are selected, etc.
You lost me there. In your original post, you want to display two lines if both NSW and QLD are selected but now you want to display just one line?
On the contrary, I want 2 lines displayed on the chart if 2 states are selected in the State Filter slicer. However, after I've applied your recommended solution the chart is now only displaying 1 line, see below.
I have Date as the X-axis and Price as the Y-axis. However it appears that the chart is displaying the average of both the NSW and QLD prices rather than showing each state's prices separately. Am I missing something?
Underlying table:
Chart:
Hi,
Drag State to the legend well of the Line chart.
You are supposed to add the states to the legend tile.
Aha that's why.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.