Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I'm strugling to understand how to implement dynamic variables to my stacked area chart. I've tried looking at different solutions, but I can't comprehend how to apply it to my own data.
My data table consist of the following table from Excel:
Sector | Year | Costs | Tech A reductions | Tech B reductions | Tech C reductions | Tech D reductions |
Farms | 2025 | 500 | -15 | -10 | ||
Farms | 2027 | 515 | -35 | -50 | ||
Fishing | 2025 | 1500 | -60 | -100 | ||
Fishing | 2027 | 1525 | -150 | -120 |
In my stacked area chart, I want to be able to have a slicer that toogles "Farms" or "Fishing". But if I select only "Farms" for instance, I only want the legends for Tech A and Tech B to be visible, since all the numbers from the two "Fishing"-related columns aren't present in the visual anyways (except for their legends, that are cluttering my visual).
In my stacked area chart, I have "Year" on the X-axis and "Costs" & "Tech A-D" on the Y-axis.
Any help is greatly appreciated. Apologies if this has been asked before, but I couldn't get other solutions to work for me.
Best regards
Solved! Go to Solution.
You do that by bringing your source data into a usable format. The process is called unpivoting.
From
to
From there your legend issues resolve themselves.
Thanks Ibendin, for making that clear to me.
The solution was indeed to unpivot the cost-column and the technology columns.
You do that by bringing your source data into a usable format. The process is called unpivoting.
From
to
From there your legend issues resolve themselves.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |