<?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: Use slicer value in Dax Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439780#M130615</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="511385" data-lia-user-login="mlsx4" class="lia-mention lia-mention-user"&gt;mlsx4&lt;/a&gt;&amp;nbsp;thanks for the feedback. See below an image of the table I'm trying to achieve - This is what my current Measures are returning. It looks like your suggested solution gives the total up to the date but doesn't show it month by month as shown below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hope that makes more sense!&lt;/P&gt;</description>
    <pubDate>Wed, 20 Sep 2023 10:31:52 GMT</pubDate>
    <dc:creator>Saskwyt</dc:creator>
    <dc:date>2023-09-20T10:31:52Z</dc:date>
    <item>
      <title>Use slicer value in Dax Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439735#M130609</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see attached a basic PBIX model showing a sales table, a budget table and a date table. I'm trying to work out how to adjust the DAX for the measures All_Sales and All_Budget.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://t4designlimited-my.sharepoint.com/:u:/r/personal/markshort_t4design_com/Documents/Power%20BI/Old_or_WIP/Sales%20vs%20Budget.pbix?csf=1&amp;amp;web=1&amp;amp;e=CuGU8Z" target="_blank"&gt;Sales vs Budget.pbix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measures are currently as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;All_Sales =&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Calculate(&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; &amp;nbsp; SUM(Tbl_Sales[Sales]),&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filter(Date_Table,Date_Table[Date] &amp;lt;= Date(2023,6,30))&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;All_Budget =&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Calculate(&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; &amp;nbsp; SUM(Tbl_Budget[Budget]),&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filter(Date_Table,Date_Table[EOM] &amp;gt; Date(2023,6,30))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to change the DAX so that the "Date(2023,6,30)" is replaced by the value I choose in my Date slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me achieve this please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 10:01:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439735#M130609</guid>
      <dc:creator>Saskwyt</dc:creator>
      <dc:date>2023-09-20T10:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use slicer value in Dax Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439761#M130612</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="508515" data-lia-user-login="Saskwyt" class="lia-mention lia-mention-user"&gt;Saskwyt&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot see the pbix, but you can do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;All_Sales = 
  var _max = maxx(ALLSELECTED('Date_Table'),'Date_Table'[Date])
RETURN 
  CALCULATE(SUM(Tbl_Sales[Sales], FILTER(ALL('Date_Table'),'Date_Table'[Date]&amp;lt;=_max))&lt;/LI-CODE&gt;&lt;P&gt;Same for budget...&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 10:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439761#M130612</guid>
      <dc:creator>mlsx4</dc:creator>
      <dc:date>2023-09-20T10:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Use slicer value in Dax Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439780#M130615</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="511385" data-lia-user-login="mlsx4" class="lia-mention lia-mention-user"&gt;mlsx4&lt;/a&gt;&amp;nbsp;thanks for the feedback. See below an image of the table I'm trying to achieve - This is what my current Measures are returning. It looks like your suggested solution gives the total up to the date but doesn't show it month by month as shown below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hope that makes more sense!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 10:31:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439780#M130615</guid>
      <dc:creator>Saskwyt</dc:creator>
      <dc:date>2023-09-20T10:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use slicer value in Dax Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439807#M130617</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="508515" data-lia-user-login="Saskwyt" class="lia-mention lia-mention-user"&gt;Saskwyt&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm afraid then you will need to create some kind of a flag. I will give you a thread similar of what I'm thinking about:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Date-flag-based-on-slicer-selection-and-Dynamic-measure-values/m-p/1485968#M617448" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/Date-flag-based-on-slicer-selection-and-Dynamic-measure-values/m-p/1485968#M617448&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 10:54:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439807#M130617</guid>
      <dc:creator>mlsx4</dc:creator>
      <dc:date>2023-09-20T10:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Use slicer value in Dax Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439833#M130620</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="508515" data-lia-user-login="Saskwyt" class="lia-mention lia-mention-user"&gt;Saskwyt&lt;/a&gt;&amp;nbsp;, The function selectedvalue should help in this condition.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;All_Sales =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(Tbl_Sales[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Date_Table[Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(Date_Table[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This should take the sum of sales till the date on slicer.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Sep 2023 12:05:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439833#M130620</guid>
      <dc:creator>ChiragGarg2512</dc:creator>
      <dc:date>2023-09-20T12:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use slicer value in Dax Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439901#M130625</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="511385" data-lia-user-login="mlsx4" class="lia-mention lia-mention-user"&gt;mlsx4&lt;/a&gt;&amp;nbsp;I've managed to apply the information in the link to achieve what I was looking for, I've even managed to get a total column! There is one minor issue....the totals on the table are not correct &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The measure I've used for Sales_£ is as follows:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sales_£ = 
VAR date1 =
    SELECTEDVALUE ( 'Table'[EOM] )
VAR date2 =
    SELECTEDVALUE ( 'Calendar'[EOM] )
RETURN
    IF ( date2 &amp;lt;= date1, Sum(Tbl_Sales[Sales]), 0 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Hope the above makes sense!!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 12:02:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439901#M130625</guid>
      <dc:creator>Saskwyt</dc:creator>
      <dc:date>2023-09-20T12:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use slicer value in Dax Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439946#M130632</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="615042" data-lia-user-login="ChiragGarg2512" class="lia-mention lia-mention-user"&gt;ChiragGarg2512&lt;/a&gt;&amp;nbsp;I can't seem to get this to work...Thank you for your response though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2023 12:37:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-slicer-value-in-Dax-Measure/m-p/3439946#M130632</guid>
      <dc:creator>Saskwyt</dc:creator>
      <dc:date>2023-09-20T12:37:56Z</dc:date>
    </item>
  </channel>
</rss>

