<?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: if date possible  switch in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688818#M143318</link>
    <description>&lt;P&gt;Thanks but I just have all blanks in the column unfortunatley...&lt;/P&gt;</description>
    <pubDate>Thu, 08 Feb 2024 15:53:34 GMT</pubDate>
    <dc:creator>matts29</dc:creator>
    <dc:date>2024-02-08T15:53:34Z</dc:date>
    <item>
      <title>if date possible  switch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688636#M143310</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone can assist please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to say in 1 column the below please?&lt;/P&gt;&lt;P&gt;The rdate contains a series of dates in the past and the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rdate = last order over 2 and a half years ago&amp;nbsp;&lt;SPAN&gt;then 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;rdate=&amp;nbsp; should be re-ordered within 6 months then 2&lt;/P&gt;&lt;P&gt;rdate=&amp;nbsp;order last reviewed less than 2 and a half years ago then 3&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Feb 2024 14:47:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688636#M143310</guid>
      <dc:creator>matts29</dc:creator>
      <dc:date>2024-02-08T14:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: if date possible  switch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688753#M143313</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="687357" data-lia-user-login="matts29" class="lia-mention lia-mention-user"&gt;matts29&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Can you try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;rdateCalc =
VAR __Difference =
    DATEDIFF ( MAXX ( 'SomeDateTable', 'SomeDateTable'[rdate] ), TODAY (), DAY )
VAR __Result =
    IF (
        __Difference &amp;gt; 913,
        1,
        IF (
            __Difference &amp;lt; 913
                &amp;amp;&amp;amp; __Difference &amp;gt; 0,
            3,
            IF ( __Difference &amp;lt; 0 &amp;amp;&amp;amp; __Difference &amp;gt; -180, 2, BLANK () )
        )
    )
RETURN
    __Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 15:17:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688753#M143313</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-02-08T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: if date possible  switch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688818#M143318</link>
      <description>&lt;P&gt;Thanks but I just have all blanks in the column unfortunatley...&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 15:53:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688818#M143318</guid>
      <dc:creator>matts29</dc:creator>
      <dc:date>2024-02-08T15:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: if date possible  switch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688831#M143319</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="687357" data-lia-user-login="matts29" class="lia-mention lia-mention-user"&gt;matts29&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you show the formula and some sample data?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 15:58:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688831#M143319</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-02-08T15:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: if date possible  switch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688850#M143323</link>
      <description>&lt;P&gt;sure this is the adjusted formula&lt;/P&gt;&lt;PRE&gt;VAR __Difference =
    DATEDIFF ( MAXX ( 'SomeDateTable', 'SomeDateTable'[rdate] ), TODAY (), DAY )
VAR __Result =
    IF (
        __Difference &amp;gt; 913,
        1,
        IF (
            __Difference &amp;lt; 913
                &amp;amp;&amp;amp; __Difference &amp;gt; 0,
            3,
            IF ( __Difference &amp;lt; 0 &amp;amp;&amp;amp; __Difference &amp;gt; -180, 2, BLANK () )
        )
    )
RETURN
    __Result&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This s the sample data from the date table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 16:07:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688850#M143323</guid>
      <dc:creator>matts29</dc:creator>
      <dc:date>2024-02-08T16:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: if date possible  switch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688966#M143331</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="687357" data-lia-user-login="matts29" class="lia-mention lia-mention-user"&gt;matts29&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Are you using the formula in Calculated column or measure?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 17:07:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688966#M143331</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-02-08T17:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: if date possible  switch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688969#M143332</link>
      <description>&lt;P&gt;In a calculated column?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 17:10:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3688969#M143332</guid>
      <dc:creator>matts29</dc:creator>
      <dc:date>2024-02-08T17:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: if date possible  switch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3689104#M143343</link>
      <description>&lt;P&gt;Ok. I wrote the formula for a measure actually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please use the following for calculated column:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;rdateCalc =
VAR __Difference =
    DATEDIFF ( 'SomeDateTable'[rdate], TODAY (), DAY )
VAR __Result =
    IF (
        __Difference &amp;gt; 913,
        1,
        IF (
            __Difference &amp;lt; 913
                &amp;amp;&amp;amp; __Difference &amp;gt; 0,
            3,
            IF ( __Difference &amp;lt; 0 &amp;amp;&amp;amp; __Difference &amp;gt; -180, 2, BLANK () )
        )
    )
RETURN
    __Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 18:37:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3689104#M143343</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-02-08T18:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: if date possible  switch</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3690463#M143408</link>
      <description>&lt;P&gt;Ahh that is fantastic-thank you! I need to learn now what everything is doing &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 09:53:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-date-possible-switch/m-p/3690463#M143408</guid>
      <dc:creator>matts29</dc:creator>
      <dc:date>2024-02-09T09:53:03Z</dc:date>
    </item>
  </channel>
</rss>

