<?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 Third condition in IF measure based on a date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1819670#M38579</link>
    <description>&lt;P&gt;Hi.&lt;BR /&gt;I have a matrix with the purpose to show what we have sold or not sold to a customer based on this measure:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Sold/Not Sold = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;EM&gt;(IF(SUM('Salestable1'[Sales Quantity])&amp;gt;0,UNICHAR(9989),UNICHAR(10060)))&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;The matrix looks like this:&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;My question:&lt;BR /&gt;I want to add a third condition to my &lt;EM&gt;measure&lt;/EM&gt; that shows that if Sales Quantity &amp;gt;0 after 01.05.2021 and Sales Quantity&amp;lt;=0 before 01.05.2021 then a "&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;" should appear.&amp;nbsp;&lt;BR /&gt;Can someone help me to show me an example of how this could be done in my measure?&lt;BR /&gt;Thanks!&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 03 May 2021 11:08:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-05-03T11:08:07Z</dc:date>
    <item>
      <title>Third condition in IF measure based on a date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1819670#M38579</link>
      <description>&lt;P&gt;Hi.&lt;BR /&gt;I have a matrix with the purpose to show what we have sold or not sold to a customer based on this measure:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Sold/Not Sold = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;EM&gt;(IF(SUM('Salestable1'[Sales Quantity])&amp;gt;0,UNICHAR(9989),UNICHAR(10060)))&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;The matrix looks like this:&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;My question:&lt;BR /&gt;I want to add a third condition to my &lt;EM&gt;measure&lt;/EM&gt; that shows that if Sales Quantity &amp;gt;0 after 01.05.2021 and Sales Quantity&amp;lt;=0 before 01.05.2021 then a "&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;" should appear.&amp;nbsp;&lt;BR /&gt;Can someone help me to show me an example of how this could be done in my measure?&lt;BR /&gt;Thanks!&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 May 2021 11:08:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1819670#M38579</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-03T11:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Third condition in IF measure based on a date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1819758#M38585</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , if date is in context of the visual then try like (correct the unicode) &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Switch(true() ,&lt;BR /&gt;SUM('Salestable1'[Sales Quantity])&amp;gt;0 &amp;amp;&amp;amp; Max(Date[Date]) &amp;gt;= date(2021,05,01),UNICHAR(9989),&lt;BR /&gt;SUM('Salestable1'[Sales Quantity])&amp;gt;0 &amp;amp;&amp;amp; Max(Date[Date]) &amp;lt; date(2021,05,01),UNICHAR(10060),&lt;BR /&gt;,UNICHAR(10060))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not they you have create measure for before and after 1st may&lt;/P&gt;</description>
      <pubDate>Mon, 03 May 2021 11:59:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1819758#M38585</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-05-03T11:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Third condition in IF measure based on a date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1819778#M38587</link>
      <description>&lt;LI-CODE lang="csharp"&gt;[Total Quantity] = SUM( 'Salestable1'[Sales Quantity] )

[Sold/Not Sold] =
var CutofffDate = DATE( 2021, 5, 1)
var TotalQuantityBeforeIsNotPositive =
    CALCULATE(
        [Total Quantity] &amp;lt;= 0,
        // 'Calendar' must be a proper date table
        // in the model connected to the fact table.
        'Calendar'[Date] &amp;lt; CutoffDate
    )
var TotalQuantityAfterOrOnIsPositive =
    CALCULATE(
        [Total Quantity] &amp;gt; 0,
        // 'Calendar' must be a proper date table
        // in the model connected to the fact table.
        'Calendar'[Date] &amp;gt;= CutoffDate
    )    
var TotalQuantityWeirdnessCondition = 
    TotalQuantityBeforeIsNotPositive
    &amp;amp;&amp;amp;
    TotalQuantityAfterOrOnIsPositive
var Result =
    switch( true(),
    
        TotalQuantityWeirdnessCondition,
            "&amp;lt;glowing star&amp;gt;",
            
        [Total Quantity] &amp;gt; 0,
            UNICHAR(9989),
            
        // When [Total Quantity] &amp;lt;= 0...
        UNICHAR(10060)
    )
return
    Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 May 2021 12:07:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1819778#M38587</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2021-05-03T12:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Third condition in IF measure based on a date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1821544#M38628</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255913" data-lia-user-login="daxer-almighty" class="lia-mention lia-mention-user"&gt;daxer-almighty&lt;/a&gt;&amp;nbsp;that seems to work great!&lt;BR /&gt;It seems like I cant sort it by the three conditions in my matrix:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do you have a solution for this aswell?&lt;BR /&gt;And: is it possible to get those three conditions in a slicer visual?&lt;BR /&gt;Appreciate it!&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 07:35:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1821544#M38628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-04T07:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Third condition in IF measure based on a date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1828361#M38850</link>
      <description>&lt;P&gt;Of course, it is possible. But what do you mean by "can't sort them"? The &amp;lt;glowing star&amp;gt; is something I put in but you have to change it to the right unicode character. Then, to sort them the way you want you have to use a trick called "zero-character space" and attach 0, 1 and 2 such spaces to the beginning of each of these unicode chars. Google for an article on sorting measure values on &lt;A href="http://www.sqlbi.com" target="_blank"&gt;www.sqlbi.com&lt;/A&gt;&amp;nbsp;or find the relevant vid on YT by Alberto Ferrari where he shows how to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get these chars in a slicer you have to create a disconnected table with these chars (plus the spaces) as values. It'll be a disconnected dimension.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 19:09:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Third-condition-in-IF-measure-based-on-a-date/m-p/1828361#M38850</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2021-05-06T19:09:25Z</dc:date>
    </item>
  </channel>
</rss>

