Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.