<?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: Caculated column with Dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caculated-column-with-Dax/m-p/3169849#M114222</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello Anis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not FreemanZ, but hopefully my solution below is acceptable too.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; Let me know if the below calculated column works for you or if it is not what you're looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Comparison = 
VAR CurrentDate = Table1[Retail Date]
VAR FilteredSales =
FILTER (
    Table1,
    DATEDIFF ( Table1[Retail Date], CurrentDate, DAY ) &amp;lt; 14 &amp;amp;&amp;amp;
    DATEDIFF ( Table1[Retail Date], CurrentDate, DAY ) &amp;gt;= 0
)
VAR Last14DaysSales =
SUMX (
    FilteredSales,
    Table1[Daily Sales]
)

RETURN
SWITCH (
    TRUE(),
    NOT ( ISBLANK ( Table1[Daily Sales] ) ) &amp;amp;&amp;amp; Last14DaysSales &amp;gt; 0, "Yes",
   "No"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----------------------------------&lt;BR /&gt;If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2023 15:36:49 GMT</pubDate>
    <dc:creator>Wilson_</dc:creator>
    <dc:date>2023-04-03T15:36:49Z</dc:date>
    <item>
      <title>Caculated column with Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caculated-column-with-Dax/m-p/3169639#M114210</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;For this data set&lt;BR /&gt;I want to achieve for each StoreCode the Daily Sale is not blank and &amp;gt;0 for last 14 days then in Comparison column I want Yes else No.&lt;BR /&gt;Please help me writing this dax&amp;nbsp;&lt;/P&gt;&lt;P&gt;@f&lt;SPAN&gt;reemanZ&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 14:20:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caculated-column-with-Dax/m-p/3169639#M114210</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-03T14:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Caculated column with Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caculated-column-with-Dax/m-p/3169849#M114222</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello Anis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not FreemanZ, but hopefully my solution below is acceptable too.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; Let me know if the below calculated column works for you or if it is not what you're looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Comparison = 
VAR CurrentDate = Table1[Retail Date]
VAR FilteredSales =
FILTER (
    Table1,
    DATEDIFF ( Table1[Retail Date], CurrentDate, DAY ) &amp;lt; 14 &amp;amp;&amp;amp;
    DATEDIFF ( Table1[Retail Date], CurrentDate, DAY ) &amp;gt;= 0
)
VAR Last14DaysSales =
SUMX (
    FilteredSales,
    Table1[Daily Sales]
)

RETURN
SWITCH (
    TRUE(),
    NOT ( ISBLANK ( Table1[Daily Sales] ) ) &amp;amp;&amp;amp; Last14DaysSales &amp;gt; 0, "Yes",
   "No"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----------------------------------&lt;BR /&gt;If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 15:36:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caculated-column-with-Dax/m-p/3169849#M114222</guid>
      <dc:creator>Wilson_</dc:creator>
      <dc:date>2023-04-03T15:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Caculated column with Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caculated-column-with-Dax/m-p/3169860#M114223</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Comparison =&lt;BR /&gt;VAR CurrentDate = Sales[Retail Dates]&lt;BR /&gt;VAR CurrentStoreTable =&lt;BR /&gt;CALCULATETABLE ( Sales, ALLEXCEPT ( Sales, Sales[StoreCode] ) )&lt;BR /&gt;VAR Last14Days =&lt;BR /&gt;FILTER (&lt;BR /&gt;CurrentStoreTable,&lt;BR /&gt;Sales[Retail Dates] &amp;lt;= CurrentDate&lt;BR /&gt;&amp;amp;&amp;amp; Sales[Retail Dates] &amp;gt; CurrentDate - 14&lt;BR /&gt;)&lt;BR /&gt;VAR Last14DaysWithValue =&lt;BR /&gt;FILTER ( Last14Days, Sales[Daily Sale] &amp;gt; 0 )&lt;BR /&gt;RETURN&lt;BR /&gt;IF ( COUNTROWS ( Last14DaysWithValue ) = COUNTROWS ( Last14Days ), "Yes", "No" )&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 15:41:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caculated-column-with-Dax/m-p/3169860#M114223</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-03T15:41:43Z</dc:date>
    </item>
  </channel>
</rss>

