<?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: How do I get column header names as a slicer to change the legend dynamically? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1970032#M43244</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the answer. I duplicated the table and unpivoted it as you suggested for getting the slicer with header names, but both these tables are not connected. So, when I select the attribute filter the legend doesn't change. For example in the below figure, when I select 'Income', or 'Cost', or any other filter, the value doesn't change. What I need is for the legend to change to 'Income' when I select 'Income' in the slicer and to 'Cost' when I select the 'Cost'.&amp;nbsp; Hope my question is clear.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jul 2021 08:10:47 GMT</pubDate>
    <dc:creator>Yashbaby</dc:creator>
    <dc:date>2021-07-21T08:10:47Z</dc:date>
    <item>
      <title>How do I get column header names as a slicer to change the legend dynamically?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1969838#M43233</link>
      <description>&lt;P&gt;Hi, I want to create a slicer with all the column header names, and when I select a column header name in the slicer, the visual/graph legend must change to that column values.&lt;/P&gt;&lt;P&gt;For example, let's take the below data which has column headers as Sales, Cost, Income, Region, and Year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So, I want to create a slicer with all the header names (Sales, Cost, Income, Region, Year), and when I select a header name the legend needs to change to that header. For example, if I select 'Sales' in the slicer I need to get the below graph and the same way for 'Income, Region, Cost, Year' when I select 'Income, Region, Cost, Year' respectively in the slicer.&amp;nbsp; I tried looking for this solution, but I couldn't find it anywhere. Can someone please help me with this?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 07:42:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1969838#M43233</guid>
      <dc:creator>Yashbaby</dc:creator>
      <dc:date>2021-07-21T07:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get column header names as a slicer to change the legend dynamically?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1969947#M43237</link>
      <description>&lt;P&gt;you need unpivot your data firstly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 07:28:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1969947#M43237</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2021-07-21T07:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get column header names as a slicer to change the legend dynamically?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1969956#M43238</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281675" data-lia-user-login="Yashbaby" class="lia-mention lia-mention-user"&gt;Yashbaby&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;I am not sure about legend, but you can achieve your desired result using unpivot.&lt;/P&gt;&lt;P&gt;However, the output screenshot you provided doesn't require any other feature.&lt;/P&gt;&lt;P&gt;It is a simple bar visual with Cost on Axis,Sales on Legend and Income on values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can help you with having column header names on the slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sanket Bhagwat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 07:32:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1969956#M43238</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-21T07:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get column header names as a slicer to change the legend dynamically?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1969974#M43240</link>
      <description>&lt;P&gt;Please confirm once what exact utput you need.&lt;/P&gt;&lt;P&gt;And if you want to have a slicer with column header names then follow the below steps.&lt;/P&gt;&lt;P&gt;1)Home-&amp;gt;Transform Data.&lt;/P&gt;&lt;P&gt;2)Right click on column headers which you want in your slicer-&amp;gt;Go to Transform-&amp;gt;Unpivot Columns-&amp;gt;Choose Unpivot Columns.&lt;/P&gt;&lt;P&gt;3)You will get 2 columns viz. Attribute and Value.&lt;/P&gt;&lt;P&gt;4)Home-&amp;gt;Close and Apply.&lt;/P&gt;&lt;P&gt;5)Go to your report and drag a slicer onto your report page.&lt;/P&gt;&lt;P&gt;6)Add the 'attribute' field into the slicer.&lt;/P&gt;&lt;P&gt;7)Drag a bar and add value field into it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will get the output.&lt;/P&gt;&lt;P&gt;Do&amp;nbsp; let me know if that works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post helps, then please mark it as 'Accept as Solution' so that others could find it easily.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 07:40:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1969974#M43240</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-21T07:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get column header names as a slicer to change the legend dynamically?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1970032#M43244</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the answer. I duplicated the table and unpivoted it as you suggested for getting the slicer with header names, but both these tables are not connected. So, when I select the attribute filter the legend doesn't change. For example in the below figure, when I select 'Income', or 'Cost', or any other filter, the value doesn't change. What I need is for the legend to change to 'Income' when I select 'Income' in the slicer and to 'Cost' when I select the 'Cost'.&amp;nbsp; Hope my question is clear.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 08:10:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1970032#M43244</guid>
      <dc:creator>Yashbaby</dc:creator>
      <dc:date>2021-07-21T08:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get column header names as a slicer to change the legend dynamically?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1970073#M43248</link>
      <description>&lt;P&gt;Yes,that is obvious.&lt;/P&gt;&lt;P&gt;Tables would not be related.&lt;/P&gt;&lt;P&gt;You need to do that in one table only.&lt;/P&gt;&lt;P&gt;That is why I said that I am not sure about legend.&lt;/P&gt;&lt;P&gt;Check out&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/dynamic-legend-based-on-slicer-selection-possible/td-p/1228422" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/dynamic-legend-based-on-slicer-selection-possible/td-p/1228422.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sanket Bhagwat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 08:34:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1970073#M43248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-21T08:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get column header names as a slicer to change the legend dynamically?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1970111#M43250</link>
      <description>&lt;P&gt;I found this youtube video helpful. Please find it here&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=8e8a3o1w51M&amp;amp;t=444s" target="_blank"&gt;https://www.youtube.com/watch?v=8e8a3o1w51M&amp;amp;t=444s&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 09:10:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-get-column-header-names-as-a-slicer-to-change-the/m-p/1970111#M43250</guid>
      <dc:creator>Yashbaby</dc:creator>
      <dc:date>2021-07-21T09:10:30Z</dc:date>
    </item>
  </channel>
</rss>

