<?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: Create a column with condition based on different columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2154862#M49735</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="199176" data-lia-user-login="v-yingjl" class="lia-mention lia-mention-user"&gt;v-yingjl&lt;/a&gt;&amp;nbsp; thank you for the support.&amp;nbsp;&lt;BR /&gt;if in the above-given scenario, the user has the possibility of filtering or choosing ( two dates- one to another date ), that will determine the status of the primary key.&amp;nbsp;&lt;BR /&gt;How could you write DAX.&lt;BR /&gt;thank you in advance for the support.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 05:10:16 GMT</pubDate>
    <dc:creator>surajbh</dc:creator>
    <dc:date>2021-10-26T05:10:16Z</dc:date>
    <item>
      <title>Create a column with condition based on different columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2129343#M48857</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;BR /&gt;I want to create a formula in DAX, which create a case/ condition as column - status (New, updated,unchanged).&lt;BR /&gt;that should compare between today vs yesterday (latest date as of yesterday) and &lt;STRONG&gt;primary key&lt;/STRONG&gt;, &lt;STRONG&gt;sales&lt;/STRONG&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Let me know if the above question/query is still unclear.&amp;nbsp;&lt;BR /&gt;Thank you very much for the support.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greeting,&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 09:55:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2129343#M48857</guid>
      <dc:creator>surajbh</dc:creator>
      <dc:date>2021-10-12T09:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create a column with condition based on different columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2129511#M48859</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="197663" data-lia-user-login="surajbh" class="lia-mention lia-mention-user"&gt;surajbh&lt;/a&gt; , Try a new column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new column =&lt;BR /&gt;var _last = maxx(filter(Table, [Date] =earlier([Date])-1 &amp;amp;&amp;amp; [primary key] =earlier([primary key])),[sales])&lt;BR /&gt;return &lt;BR /&gt;Switch(true() ,&lt;BR /&gt;isblank(_last) , "New" ,&lt;BR /&gt;_last &amp;lt;&amp;gt; [sales] , "Updated"&lt;BR /&gt;,"same"&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 11:06:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2129511#M48859</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-10-12T11:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create a column with condition based on different columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2129593#M48861</link>
      <description>&lt;P&gt;&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; thank you for the code.&lt;BR /&gt;if in the above scenario, if I want to find the delta of sales with reference today(the one which I filter) and yesterday (with reference to filtered)- what could you suggest to write in dax.&lt;BR /&gt;thank you in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 11:49:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2129593#M48861</guid>
      <dc:creator>surajbh</dc:creator>
      <dc:date>2021-10-12T11:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create a column with condition based on different columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2136282#M49058</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="197663" data-lia-user-login="surajbh" class="lia-mention lia-mention-user"&gt;surajbh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The reference could be like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Reference = 
VAR _last =
    MAXX (
        FILTER (
            'Table',
            [Date]
                = EARLIER ( 'Table'[Date] ) - 1
                &amp;amp;&amp;amp; [Primary key] = EARLIER ( 'Table'[Primary key] )
        ),
        [Sales]
    )
return
[Sales] - _last&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yingjie Li&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2021 02:24:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2136282#M49058</guid>
      <dc:creator>v-yingjl</dc:creator>
      <dc:date>2021-10-15T02:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create a column with condition based on different columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2154862#M49735</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="199176" data-lia-user-login="v-yingjl" class="lia-mention lia-mention-user"&gt;v-yingjl&lt;/a&gt;&amp;nbsp; thank you for the support.&amp;nbsp;&lt;BR /&gt;if in the above-given scenario, the user has the possibility of filtering or choosing ( two dates- one to another date ), that will determine the status of the primary key.&amp;nbsp;&lt;BR /&gt;How could you write DAX.&lt;BR /&gt;thank you in advance for the support.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 05:10:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-column-with-condition-based-on-different-columns/m-p/2154862#M49735</guid>
      <dc:creator>surajbh</dc:creator>
      <dc:date>2021-10-26T05:10:16Z</dc:date>
    </item>
  </channel>
</rss>

