<?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 DATEFunction in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1901124#M40992</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="139013" data-lia-user-login="sandee" class="lia-mention lia-mention-user"&gt;sandee&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if I understand it right the winter sales should just cover the sales in December, January and February, correct?&lt;/P&gt;&lt;P&gt;In this case I would just filter to these months. Check if the following measure would work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Winter Sales =
CALCULATE(
    [Sales Amount],
    MONTH( 'Date'[Date] )
        IN {
        12,
        1,
        2
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also be aware that your approach wouldn't cover February 29th in a leap year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;If you need any help please let me know.&lt;/DIV&gt;&lt;DIV&gt;If I answered your question I would be happy if you could mark my post as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and give it a thumbs up &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Best regards&lt;/DIV&gt;&lt;DIV&gt;Denis&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Blog: &lt;A title="Click here!" href="https://whatthefact.bi/?utm_source=powerbicommunity&amp;amp;utm_medium=link&amp;amp;utm_campaign=forum" target="_blank" rel="noopener"&gt;&lt;U&gt;WhatTheFact.bi&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;Follow me: &lt;A title="Click here!" href="https://twitter.com/DenSelimovic" target="_blank" rel="noopener"&gt;&lt;U&gt;twitter.com/DenSelimovic&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jun 2021 10:30:29 GMT</pubDate>
    <dc:creator>selimovd</dc:creator>
    <dc:date>2021-06-15T10:30:29Z</dc:date>
    <item>
      <title>Dynamic DATEFunction</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1901059#M40991</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 calculate "&lt;STRONG&gt;Winter sale"&lt;/STRONG&gt; and want to build the dynamic &lt;STRONG&gt;"Date"&amp;nbsp;&lt;/STRONG&gt;so that power bi calpture that period and give results according to that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my DAX, but it is not working, seems that "Date" Measure inside is not accepting same:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Winter Sales = VAR LADATE = MAX('Date'[Date])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR CYR = YEAR(LADATE)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;STRONG&gt;RETURN&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;CALCULATE([Sales Amount],KEEPFILTERS(FILTER(ALL('Date'[Date]),&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;'Date'[Date] &amp;gt;= DATE(CYR,12,01) &amp;amp;&amp;amp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;'Date'[Date] &amp;lt;= DATE(CYR,02,28)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;)))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;img /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;i want to show all four seasons sale, only the Winter is remaining.&amp;nbsp;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 15 Jun 2021 10:05:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1901059#M40991</guid>
      <dc:creator>sandee</dc:creator>
      <dc:date>2021-06-15T10:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic DATEFunction</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1901124#M40992</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="139013" data-lia-user-login="sandee" class="lia-mention lia-mention-user"&gt;sandee&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if I understand it right the winter sales should just cover the sales in December, January and February, correct?&lt;/P&gt;&lt;P&gt;In this case I would just filter to these months. Check if the following measure would work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Winter Sales =
CALCULATE(
    [Sales Amount],
    MONTH( 'Date'[Date] )
        IN {
        12,
        1,
        2
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also be aware that your approach wouldn't cover February 29th in a leap year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;If you need any help please let me know.&lt;/DIV&gt;&lt;DIV&gt;If I answered your question I would be happy if you could mark my post as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and give it a thumbs up &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Best regards&lt;/DIV&gt;&lt;DIV&gt;Denis&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Blog: &lt;A title="Click here!" href="https://whatthefact.bi/?utm_source=powerbicommunity&amp;amp;utm_medium=link&amp;amp;utm_campaign=forum" target="_blank" rel="noopener"&gt;&lt;U&gt;WhatTheFact.bi&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;Follow me: &lt;A title="Click here!" href="https://twitter.com/DenSelimovic" target="_blank" rel="noopener"&gt;&lt;U&gt;twitter.com/DenSelimovic&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 10:30:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1901124#M40992</guid>
      <dc:creator>selimovd</dc:creator>
      <dc:date>2021-06-15T10:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic DATEFunction</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1901685#M41012</link>
      <description>&lt;P&gt;Hi Selimovd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is incredible, you made this DAX very easy , i was working on filter condition on "&amp;gt;= &amp;amp;&amp;amp; "&amp;lt;=". and was trying to work on &lt;STRONG&gt;"Date" dax&amp;nbsp;&lt;/STRONG&gt; so that i can enter the proper format. but it was not accepting same.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 14:59:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1901685#M41012</guid>
      <dc:creator>sandee</dc:creator>
      <dc:date>2021-06-15T14:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic DATEFunction</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1901694#M41014</link>
      <description>&lt;P&gt;My Solution :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;thnaks Selimovd....&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 15:03:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1901694#M41014</guid>
      <dc:creator>sandee</dc:creator>
      <dc:date>2021-06-15T15:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic DATEFunction</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1902981#M41044</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="139013" data-lia-user-login="sandee" class="lia-mention lia-mention-user"&gt;sandee&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm happy it worked&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That's also normal, many times I was thinking way too complicated. But when you write more DAX thing will get easier. Keep going&amp;nbsp;&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;Have fun and best regards&lt;/P&gt;&lt;P&gt;Denis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 07:11:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-DATEFunction/m-p/1902981#M41044</guid>
      <dc:creator>selimovd</dc:creator>
      <dc:date>2021-06-16T07:11:18Z</dc:date>
    </item>
  </channel>
</rss>

