<?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: DAX Measure not affected by slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979555#M99861</link>
    <description>&lt;P&gt;This keeps the measure in the same way, without being affected by the slicer.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Dec 2022 16:29:07 GMT</pubDate>
    <dc:creator>ladislaocsulak</dc:creator>
    <dc:date>2022-12-20T16:29:07Z</dc:date>
    <item>
      <title>DAX Measure not affected by slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979230#M99840</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would appreciate help with the next problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I created the following measure because I need the quantity of sales for the last 30 days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sales_quantity_last_30_days = CALCULATE(DISTINCTCOUNT(sales[id]),DATESINPERIOD ( Calendario[Date], TODAY(), -30, DAY ))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The problem is that I have a slicer to filter the dates that worked fine if I used if I looked at the quantity of total sales (not just the last 30 days). But when using the created measure, it is not affected by the slicer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And I would like the slicer to affect the measure created so that it shows sales for the previous 30 days based on the last day filtered in the slicer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I upload a dummy table where I show the situation of my measurements and how the slicer affects the measure counting the total sales and not the other that counts just the last 30 days:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://drive.google.com/drive/folders/1TOYezhAuiy0ADTNcKVL1ayNw5XoLMo_I?usp=sharing" target="_blank"&gt;https://drive.google.com/drive/folders/1TOYezhAuiy0ADTNcKVL1ayNw5XoLMo_I?usp=sharing&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 14:19:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979230#M99840</guid>
      <dc:creator>ladislaocsulak</dc:creator>
      <dc:date>2022-12-20T14:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure not affected by slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979375#M99847</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="477180" data-lia-user-login="ladislaocsulak" class="lia-mention lia-mention-user"&gt;ladislaocsulak&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please try replacing TODAY() with MAX(&lt;SPAN&gt;Calendario[Date])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 15:11:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979375#M99847</guid>
      <dc:creator>djurecic</dc:creator>
      <dc:date>2022-12-20T15:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure not affected by slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979383#M99848</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="477180" data-lia-user-login="ladislaocsulak" class="lia-mention lia-mention-user"&gt;ladislaocsulak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you pleas try the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Formula =
var __Today = TODAY()
var __StartDay = __Today - 30

Return

CALCULATE(
   DISTINCTCOUNT(sales[id]),
   DATESBETWEEN ( Calendario[Date], __StartDay, __Today)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It could be that you need to calculate -29 isntead of -30 depending on your logic&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Michael&lt;BR /&gt;-----------------------------------------------------&lt;BR /&gt;If this post helps, then please consider &lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;Appreciate your thumbs up!&lt;/STRONG&gt;&lt;BR /&gt;@ me in replies or I'll lose your thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 15:13:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979383#M99848</guid>
      <dc:creator>Mikelytics</dc:creator>
      <dc:date>2022-12-20T15:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure not affected by slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979554#M99860</link>
      <description>&lt;P&gt;This worked. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 16:28:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979554#M99860</guid>
      <dc:creator>ladislaocsulak</dc:creator>
      <dc:date>2022-12-20T16:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure not affected by slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979555#M99861</link>
      <description>&lt;P&gt;This keeps the measure in the same way, without being affected by the slicer.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 16:29:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-not-affected-by-slicer/m-p/2979555#M99861</guid>
      <dc:creator>ladislaocsulak</dc:creator>
      <dc:date>2022-12-20T16:29:07Z</dc:date>
    </item>
  </channel>
</rss>

