<?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: Dynamically legend in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/3028306#M103361</link>
    <description>&lt;P&gt;Do we have any solution to this requirement?&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2023 10:11:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-18T10:11:51Z</dc:date>
    <item>
      <title>Dynamically legend</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/1909297#M41252</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We build a schema for analysis any measures in the same sheet&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
VAR Logic Test = 
COUNTROWS(DISTINCT(FILTER(ALLSELECTED('KPI´s'[KPI]),'KPI´s'[KPI] = "Real Sales"))) = 1 
RETURN 
IF(LogicTest, [Real_Sale],blank())&lt;/LI-CODE&gt;&lt;P&gt;We utilize the visualization Line and Clustered column charts, in shared axis we have month and column values we have 4 measures&amp;nbsp;(Real sales, Planned Sales,(...)).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our problem is, when for example we selected only measure (Real Sales) the graph value appear correctly&amp;nbsp;but the legend appear all measures (not selected in filter).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way for the legend graph to be dynamic? Or create a outside legend the chart?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 15:21:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/1909297#M41252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-18T15:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically legend</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/1909442#M41258</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Follow below steps to get dynamic legends:-&lt;BR /&gt;&lt;BR /&gt;1) Open the data table in Power query adn DUPLICATE it and rename the other table.&lt;BR /&gt;2)Remove the unwanted columns from table.&lt;BR /&gt;3)Add index to both tables(Original Table and Duplicate table).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;4)Select and unpivot the columns that you want to display dynamically as legend.&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;5)After unpivoting you will get two new columns having ATTRIBUTE and VALUE&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;6) Save and close power query.&lt;BR /&gt;&lt;BR /&gt;7)In Model view tab, create relationship between Original Table and New unpivot table on Index column.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Now you can put the ATTRIBUTE column from new table(on which we have done unpivoting) in column series of clustered chart.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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>Fri, 18 Jun 2021 17:41:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/1909442#M41258</guid>
      <dc:creator>NidhiBhusari</dc:creator>
      <dc:date>2021-06-18T17:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically legend</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/1909477#M41259</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="298853" data-lia-user-login="NidhiBhusari" class="lia-mention lia-mention-user"&gt;NidhiBhusari&lt;/a&gt;&amp;nbsp;, thank you suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don´t understand why I have create a index.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try to explain myself better:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables in my model, one table (Table1) I have all data what I need and another table (Table2) I created for select all measures in one sheet:&lt;/P&gt;&lt;P&gt;Table2&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Vendas Reais = 
VAR Logic Test = 
COUNTROWS(DISTINCT(FILTER(ALLSELECTED('KPI´s'[KPI]),'KPI´s'[KPI] = " Vendas Reais"))) = 1 
RETURN 
IF(LogicTest, [Real_Sale],blank())&lt;/LI-CODE&gt;&lt;P&gt;The measure [Real_sale] is calculated in Table1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When we selected in filter a measure&amp;nbsp;&lt;SPAN&gt;the legend graph appear all measures (not selected in filter).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;We want the legend visualizations to show only the measures that are selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 18:13:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/1909477#M41259</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-18T18:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically legend</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/1909621#M41270</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;!&lt;BR /&gt;&lt;BR /&gt;Please try changing teh slicer type to be single select &amp;amp; see if that make any difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hasham&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 21:20:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/1909621#M41270</guid>
      <dc:creator>HashamNiaz</dc:creator>
      <dc:date>2021-06-18T21:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically legend</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/2946939#M97543</link>
      <description>&lt;P&gt;Thank you for this, worked perfectly on my own health data - where I wanted to have the Column Series switch between Episode of Care, Admission Category, Gender and I even added Ward to see how well it worked. Perfect!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Saved me hours of time running bookmarks etc!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ClinEpi&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 00:58:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/2946939#M97543</guid>
      <dc:creator>Clinical_Epi</dc:creator>
      <dc:date>2022-12-05T00:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically legend</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/3028306#M103361</link>
      <description>&lt;P&gt;Do we have any solution to this requirement?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 10:11:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-legend/m-p/3028306#M103361</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-18T10:11:51Z</dc:date>
    </item>
  </channel>
</rss>

