<?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 to create relative date filter using dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-relative-date-filter-using-dax/m-p/1421806#M26442</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , refer if this old solution can be bit of help&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-30/m-p/1284966#M561629" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-30/m-p/1284966#M561629&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this month vs last month use time intelligence with date table&lt;/P&gt;
&lt;P&gt;MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))&lt;BR /&gt;last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))&lt;BR /&gt;last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))&lt;BR /&gt;this month =MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))&lt;BR /&gt;last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))&lt;BR /&gt;previous month value = CALCULATE(sum(''Table''[total hours value]),previousmonth('Date'[Date]))&lt;/P&gt;
&lt;P&gt;diff = [MTD Sales]-[last MTD Sales]&lt;BR /&gt;diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Qtr on Qtr with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="1"&gt; Please provide your feedback comments and advice for new videos &lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=wvsAzTqSDVg&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb" target="_blank"&gt;Tutorial Series&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=WlvQ_SGy4iA&amp;amp;list=PLPaNVDMhUXGZNyKU0PgG2g3P0c6CPjMnj" target="_blank"&gt;Dax Vs SQL&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=My0bLn9voo4&amp;amp;list=PLPaNVDMhUXGbKatyDdOhGbTL3xW2Xy6pA" target="_blank"&gt;Direct Query&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=YWo-ZpKM6gU&amp;amp;list=PLPaNVDMhUXGYrm5rm6ME6rjzKGSvT9Jmy" target="_blank"&gt;PBI Tips&lt;/A&gt; &lt;BR /&gt;Appreciate your Kudos.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2020 15:47:08 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-10-08T15:47:08Z</dc:date>
    <item>
      <title>How to create relative date filter using dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-relative-date-filter-using-dax/m-p/1421608#M26434</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a measure to filter my graph based on relative dates. but my measure is not working unfortunately&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My default graph looks like&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like that if i click &lt;STRONG&gt;Previous Months&lt;/STRONG&gt; button, it should display all past data until end of last month (September 30 2020).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF&lt;/STRONG&gt;&amp;nbsp;current month is Nov 2020, i should see all past data until end of last month (oct 31 2020) and so on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and if i click the &lt;STRONG&gt;Current Month -&amp;gt;&lt;/STRONG&gt; button, it should only display values from current month (from Oct 1 2020) until the max date with value. if current month = December, i should see all data from dec 1 2020 until the max date with value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a calendar table (Date) that is linked to my transactions table (Client Ddate). what i did is i created a calculated column inside Calendar table:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;TodayDate = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;var today = FORMAT(TODAY(), "mm/YYYY")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;DATEDIFF(today,'Calendar'[Date],month)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then created measures to filter the past dates and current + future dates&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Past Date =&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE('Transaction'[A.Value], FILTER('Calendar', 'Calendar'[TodayDate] &amp;lt; 0))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;DIV&gt;&lt;SPAN&gt;CurrentFuture =&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE('Transaction'[A.Value], FILTER('Calendar', 'Calendar'[TodayDate] = 0 || 'Calendar'[TodayDate] &amp;gt; 0))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PROBLEM: the measures are not filtering the graph when used in switch formula bec i think my measures might be incorrect in the first place&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I hope you can help me with this. Thank you so much in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 14:32:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-relative-date-filter-using-dax/m-p/1421608#M26434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-08T14:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create relative date filter using dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-relative-date-filter-using-dax/m-p/1421806#M26442</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , refer if this old solution can be bit of help&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-30/m-p/1284966#M561629" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-30/m-p/1284966#M561629&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this month vs last month use time intelligence with date table&lt;/P&gt;
&lt;P&gt;MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))&lt;BR /&gt;last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))&lt;BR /&gt;last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))&lt;BR /&gt;this month =MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))&lt;BR /&gt;last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))&lt;BR /&gt;previous month value = CALCULATE(sum(''Table''[total hours value]),previousmonth('Date'[Date]))&lt;/P&gt;
&lt;P&gt;diff = [MTD Sales]-[last MTD Sales]&lt;BR /&gt;diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Qtr on Qtr with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="1"&gt; Please provide your feedback comments and advice for new videos &lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=wvsAzTqSDVg&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb" target="_blank"&gt;Tutorial Series&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=WlvQ_SGy4iA&amp;amp;list=PLPaNVDMhUXGZNyKU0PgG2g3P0c6CPjMnj" target="_blank"&gt;Dax Vs SQL&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=My0bLn9voo4&amp;amp;list=PLPaNVDMhUXGbKatyDdOhGbTL3xW2Xy6pA" target="_blank"&gt;Direct Query&lt;/A&gt; &lt;A href="https://www.youtube.com/watch?v=YWo-ZpKM6gU&amp;amp;list=PLPaNVDMhUXGYrm5rm6ME6rjzKGSvT9Jmy" target="_blank"&gt;PBI Tips&lt;/A&gt; &lt;BR /&gt;Appreciate your Kudos.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 15:47:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-relative-date-filter-using-dax/m-p/1421806#M26442</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-10-08T15:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create relative date filter using dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-relative-date-filter-using-dax/m-p/1588083#M31840</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;really sorry i totally forgot to respond to you. Anyway, thank you so much for your solution. it worked perfectly. I appreciate it very very much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 16:34:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-relative-date-filter-using-dax/m-p/1588083#M31840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-08T16:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create relative date filter using dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-relative-date-filter-using-dax/m-p/4004020#M156244</link>
      <description>&lt;P&gt;i am using relative date slicer&lt;BR /&gt;same i want to display in other card visual start date and end date from that slicer&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 11:57:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-relative-date-filter-using-dax/m-p/4004020#M156244</guid>
      <dc:creator>hsantosh</dc:creator>
      <dc:date>2024-06-21T11:57:25Z</dc:date>
    </item>
  </channel>
</rss>

