<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamic legend in stacked area chart in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-legend-in-stacked-area-chart/m-p/3444382#M130934</link>
    <description>&lt;P&gt;You do that by bringing your source data into a usable format. The process is called unpivoting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;From there your legend issues resolve themselves.&lt;/P&gt;</description>
    <pubDate>Sat, 23 Sep 2023 20:32:41 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-09-23T20:32:41Z</dc:date>
    <item>
      <title>Dynamic legend in stacked area chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-legend-in-stacked-area-chart/m-p/3443113#M130845</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data table consist of the following table from Excel:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Sector&lt;/TD&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;TD&gt;Costs&lt;/TD&gt;&lt;TD&gt;Tech A reductions&lt;/TD&gt;&lt;TD&gt;Tech B reductions&lt;/TD&gt;&lt;TD&gt;Tech C reductions&lt;/TD&gt;&lt;TD&gt;Tech D reductions&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Farms&lt;/TD&gt;&lt;TD&gt;2025&lt;/TD&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;-15&lt;/TD&gt;&lt;TD&gt;-10&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Farms&lt;/TD&gt;&lt;TD&gt;2027&lt;/TD&gt;&lt;TD&gt;515&lt;/TD&gt;&lt;TD&gt;-35&lt;/TD&gt;&lt;TD&gt;-50&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Fishing&lt;/TD&gt;&lt;TD&gt;2025&lt;/TD&gt;&lt;TD&gt;1500&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;-60&lt;/TD&gt;&lt;TD&gt;-100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Fishing&lt;/TD&gt;&lt;TD&gt;2027&lt;/TD&gt;&lt;TD&gt;1525&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;-150&lt;/TD&gt;&lt;TD&gt;-120&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my stacked area chart, I have "Year" on the X-axis and "Costs" &amp;amp; "Tech A-D" on the Y-axis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated. Apologies if this has been asked before, but I couldn't get other solutions to work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 13:06:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-legend-in-stacked-area-chart/m-p/3443113#M130845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-22T13:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic legend in stacked area chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-legend-in-stacked-area-chart/m-p/3444382#M130934</link>
      <description>&lt;P&gt;You do that by bringing your source data into a usable format. The process is called unpivoting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;From there your legend issues resolve themselves.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Sep 2023 20:32:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-legend-in-stacked-area-chart/m-p/3444382#M130934</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-09-23T20:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic legend in stacked area chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-legend-in-stacked-area-chart/m-p/3451244#M131474</link>
      <description>&lt;P&gt;Thanks Ibendin, for making that clear to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution was indeed to unpivot the cost-column and the technology columns.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 07:51:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-legend-in-stacked-area-chart/m-p/3451244#M131474</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-28T07:51:59Z</dc:date>
    </item>
  </channel>
</rss>

