<?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 chart to allow multiple selections from two (or more) slicers in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820340#M89540</link>
    <description>&lt;P&gt;Thanks Johnt75 - that worked!&lt;BR /&gt;&lt;BR /&gt;Do you happen to know the difference between your solution and this?&lt;/P&gt;&lt;P&gt;It looks to give the same or similar answer but something feels off with the below version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bal num =&lt;BR /&gt;var slicer1= SELECTEDVALUE(table1[status_now])&lt;BR /&gt;var slicer2= SELECTEDVALUE(table1[status_prev])&lt;BR /&gt;return&lt;BR /&gt;CALCULATE(sum(table1[balance])&lt;BR /&gt;,ALLSELECTED(table1[status_now])&lt;BR /&gt;,ALLSELECTED(table1[status_prev])&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 16:10:32 GMT</pubDate>
    <dc:creator>leeham</dc:creator>
    <dc:date>2022-10-05T16:10:32Z</dc:date>
    <item>
      <title>dynamic chart to allow multiple selections from two (or more) slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820177#M89533</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having trouble being able to select multiple options from a slicer and this being recognised in measure and then a line chart that feeds off of the output.&lt;BR /&gt;I have been successful with the chart working when selecting only one item from the slicer, the moment i choose more than one it breaks. I used selectvalue to make it work for one selection per slicer.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have a line chart&amp;nbsp; that has date in the X axis (from 2019+) .&lt;BR /&gt;My Y axis is a calculation using two measures.&lt;BR /&gt;Calculation:&lt;BR /&gt;numerator = total balance with the two slicers and the chosen selections in each applied to it [not working]&lt;BR /&gt;denominator = total balance ignoring the two slicers options chosen [this is working fine]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My numerator has two slicers for the viewer to choose from:&lt;BR /&gt;slicer1 = status of the customers this month [TEXT: "up to date", "1", "2" etc.]&lt;/P&gt;&lt;P&gt;slicer2 = status of the customers last month [TEXT: "up to date", "1", "2" etc.]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used selectvalue with DAX code and this allowed one selection from slicer1 and from slicer2.&lt;BR /&gt;I need the ability for the user to be able to choose multiple options from slicer1 and slicer2.&lt;BR /&gt;Any help on what I need to tweak to the code would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Example dax code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;bal num = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; slicer1=&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;table1&lt;/SPAN&gt;&lt;SPAN&gt;[status_now]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; slicer2= SELECTEDVALUE(table1[status_prev])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(table1[balance])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,table1[status_now] = slicer1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,table1&lt;/SPAN&gt;&lt;SPAN&gt;[status_prev]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;slicer2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 14:59:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820177#M89533</guid>
      <dc:creator>leeham</dc:creator>
      <dc:date>2022-10-05T14:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic chart to allow multiple selections from two (or more) slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820269#M89538</link>
      <description>&lt;P&gt;Instead of SELECTEDVALUE you need to use VALUES, and because that returns a table you need to use IN instead of =, e.g.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;bal num =
VAR slicer1 =
    VALUES ( table1[status_now] )
VAR slicer2 =
    VALUES ( table1[status_prev] )
RETURN
    CALCULATE (
        SUM ( table1[balance] ),
        table1[status_now] IN slicer1,
        table1[status_prev] IN slicer2
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Oct 2022 15:50:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820269#M89538</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-10-05T15:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic chart to allow multiple selections from two (or more) slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820340#M89540</link>
      <description>&lt;P&gt;Thanks Johnt75 - that worked!&lt;BR /&gt;&lt;BR /&gt;Do you happen to know the difference between your solution and this?&lt;/P&gt;&lt;P&gt;It looks to give the same or similar answer but something feels off with the below version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bal num =&lt;BR /&gt;var slicer1= SELECTEDVALUE(table1[status_now])&lt;BR /&gt;var slicer2= SELECTEDVALUE(table1[status_prev])&lt;BR /&gt;return&lt;BR /&gt;CALCULATE(sum(table1[balance])&lt;BR /&gt;,ALLSELECTED(table1[status_now])&lt;BR /&gt;,ALLSELECTED(table1[status_prev])&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 16:10:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820340#M89540</guid>
      <dc:creator>leeham</dc:creator>
      <dc:date>2022-10-05T16:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic chart to allow multiple selections from two (or more) slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820357#M89542</link>
      <description>&lt;P&gt;ALLSELECTED removes any filters which are applied by the current visual but retains filters which are applied externally. For example, if you had a table visual showing a split by category, which was also affected by a slicer on category, then inside the table visual ALLSELECTED would remove the filter on the current category for that row but would retain the filtered categories from the slicer.&lt;/P&gt;
&lt;P&gt;VALUES will not remove any filters, it will always show those values which are available in the current filter context. So in the previous example, within a table visual split by category, on each row VALUES would only return the current category.&lt;/P&gt;
&lt;P&gt;If no filters are applied within the visual then the results would be the same.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 16:20:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820357#M89542</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-10-05T16:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic chart to allow multiple selections from two (or more) slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820367#M89544</link>
      <description>&lt;P&gt;Thanks again.&lt;BR /&gt;&lt;BR /&gt;There are other filter/slicers within the main visual (product and other things) which are meant to alter both the numerator and the denominator.&amp;nbsp;&lt;BR /&gt;I think your solution allows for these other filters from what you've said which is perfect.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 16:24:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dynamic-chart-to-allow-multiple-selections-from-two-or-more/m-p/2820367#M89544</guid>
      <dc:creator>leeham</dc:creator>
      <dc:date>2022-10-05T16:24:29Z</dc:date>
    </item>
  </channel>
</rss>

