<?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: Calculate status in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1296073#M22366</link>
    <description>Anonymous&lt;/LI-USER&gt; Actually, the status is determined based on the values not on the pattern. Thanks</description>
    <pubDate>Fri, 14 Aug 2020 10:28:51 GMT</pubDate>
    <dc:creator>jitpbi</dc:creator>
    <dc:date>2020-08-14T10:28:51Z</dc:date>
    <item>
      <title>Calculate status</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1294305#M22321</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help to get the status of a field based on few conditions. The below is the sample data where &lt;STRONG&gt;"New Stats" &lt;/STRONG&gt;is the required field:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Output1&lt;/TD&gt;&lt;TD&gt;Output2&lt;/TD&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;New Status&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;TD&gt;Good&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Good&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;Good&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Error&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;Good&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Error&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;Normal&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Normal&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;130&lt;/TD&gt;&lt;TD&gt;Normal&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Normal&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Status field has only 2 values Good and Normal but i need to calculate 3 values in Status field based on the below conditions:&lt;/P&gt;&lt;P&gt;If Output1 &amp;lt; 5 and Output2 &amp;gt; 100 then "Error"&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Output1 = 0 and Output2 = 0 then "Error"&amp;nbsp;&lt;/P&gt;&lt;P&gt;other then above scenarios my new status field should pick the same value of the Status field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 17:59:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1294305#M22321</guid>
      <dc:creator>jitpbi</dc:creator>
      <dc:date>2020-08-13T17:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate status</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1294338#M22322</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236242" data-lia-user-login="jitpbi" class="lia-mention lia-mention-user"&gt;jitpbi&lt;/a&gt;&amp;nbsp; Try this:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;New Status =
VAR FirstOutput = Table[Output1]
VAR SecondOutput = Table[Output2]
VAR CurrentStatus = Table[Status]
VAR Result =
    IF (
        OR (
            AND ( FirstOutput &amp;lt; 5, SecondOutput &amp;gt; 100 ),
            AND ( FirstOutput = 0, SecondOutput = 0 )
        ),
        "Error",
        CurrentStatus
    )
RETURN
    Result&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Aug 2020 18:15:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1294338#M22322</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-08-13T18:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate status</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1294384#M22325</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236242" data-lia-user-login="jitpbi" class="lia-mention lia-mention-user"&gt;jitpbi&lt;/a&gt; , You can create a new column like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New Status =&lt;BR /&gt;Switch(true(),&lt;BR /&gt;[Output1] &amp;lt; 5 &amp;amp;&amp;amp; [Output2] &amp;gt;= 100 , "Error",&lt;BR /&gt;[Output1] =0 &amp;amp;&amp;amp; [Output2] = 0 , "Error",&lt;BR /&gt;"Normal"&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 18:44:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1294384#M22325</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-13T18:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate status</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1296006#M22363</link>
      <description>Based on your conditions, the output in the 3rd row of your table is wrong. It should be Good, not Error.</description>
      <pubDate>Fri, 14 Aug 2020 10:10:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1296006#M22363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-14T10:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate status</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1296073#M22366</link>
      <description>Anonymous&lt;/a&gt; Actually, the status is determined based on the values not on the pattern. Thanks</description>
      <pubDate>Fri, 14 Aug 2020 10:28:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1296073#M22366</guid>
      <dc:creator>jitpbi</dc:creator>
      <dc:date>2020-08-14T10:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate status</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1296241#M22373</link>
      <description>&lt;P&gt;Here's your rules:&lt;BR /&gt;&lt;BR /&gt;If Output1 &amp;lt; 5 and Output2 &amp;gt; 100 then "Error"&lt;BR /&gt;Output1 = 0 and Output2 = 0 then "Error"&lt;BR /&gt;other then above scenarios my new status field should pick the same value of the Status field.&lt;BR /&gt;&lt;BR /&gt;Now apply those to the table you've posted and you'll see I'm right. I don't even understand what you mean by saying "the status in determined based on the values not on the pattern." What pattern are you talking about? The only thing that is used to derive the values is the rules above.... No pattern in sight.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 11:15:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-status/m-p/1296241#M22373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-14T11:15:19Z</dc:date>
    </item>
  </channel>
</rss>

