<?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: Help with DAX forumula in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-DAX-forumula/m-p/1015681#M13051</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or create a new table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NewTable = 
FILTER(ALL(Table),
DATEDIFF(Table[DateTransaction], Table[DateForecast], MONTH) = 2 &amp;amp;&amp;amp; Table[Type] = "A"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Apr 2020 16:28:36 GMT</pubDate>
    <dc:creator>az38</dc:creator>
    <dc:date>2020-04-08T16:28:36Z</dc:date>
    <item>
      <title>Help with DAX forumula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-DAX-forumula/m-p/1015502#M13048</link>
      <description>&lt;P&gt;I have the following table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;DateTransaction&lt;/TD&gt;&lt;TD&gt;DateForecast&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;TD&gt;Type&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/01/2010&lt;/TD&gt;&lt;TD&gt;03/01/2010&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to show the Amount where there is a lag of 2 months and the type&amp;nbsp; = A.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SQL for this would be (but I'm not sure what the DAX would be):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT Amount from table&lt;/P&gt;&lt;P&gt;WHERE&amp;nbsp;&lt;/P&gt;&lt;P&gt;Datetransaction = Dateadd(month,2,DateForecast)&lt;/P&gt;&lt;P&gt;and type = 'A'&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 15:39:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-DAX-forumula/m-p/1015502#M13048</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-08T15:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DAX forumula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-DAX-forumula/m-p/1015642#M13050</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create a column in your data and use it as flag on your report:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IsAmountBasedOnLag = IF( &lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt;table&lt;/STRONG&gt;[Datetransaction] = DATEADD(&lt;STRONG&gt;table&lt;/STRONG&gt;[DateForecast], 2, month), &lt;STRONG&gt;table&lt;/STRONG&gt;[Amount] &amp;amp;&amp;amp; table[Type] = "A", &lt;/EM&gt;&lt;EM&gt;1, 0)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above dax expression creates a flag with 1 or 0 values in it. If your condition is met it is 1, esle it is 0.&lt;/P&gt;&lt;P&gt;On you report, add a report level filter for&amp;nbsp;&lt;U&gt;&lt;EM&gt;IsAmountBasedOnLag =&lt;/EM&gt;&lt;/U&gt;&lt;EM&gt; 1.&amp;nbsp;&lt;/EM&gt;This will display relevant details as required.&lt;/P&gt;&lt;P&gt;NOTE: Replace &lt;STRONG&gt;&lt;EM&gt;table&lt;/EM&gt;&lt;/STRONG&gt; in above DAX with your table name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pragati&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 16:17:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-DAX-forumula/m-p/1015642#M13050</guid>
      <dc:creator>Pragati11</dc:creator>
      <dc:date>2020-04-08T16:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DAX forumula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-DAX-forumula/m-p/1015681#M13051</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or create a new table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NewTable = 
FILTER(ALL(Table),
DATEDIFF(Table[DateTransaction], Table[DateForecast], MONTH) = 2 &amp;amp;&amp;amp; Table[Type] = "A"
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 16:28:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-DAX-forumula/m-p/1015681#M13051</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-04-08T16:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help with DAX forumula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-DAX-forumula/m-p/1019255#M13140</link>
      <description>&lt;P&gt;Try like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
calculate(sum(Table[Amount]), filter(all(Table),DATEDIFF(Table[DateTransaction],Table[DateForecast],Month)&amp;gt;=2 &amp;amp;&amp;amp; Table[Type] ="A"))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Apr 2020 08:57:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-DAX-forumula/m-p/1019255#M13140</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-04-10T08:57:16Z</dc:date>
    </item>
  </channel>
</rss>

