<?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: DAX Formula in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/DAX-Formula/m-p/3593040#M45901</link>
    <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="660950" data-lia-user-login="DianeUmu" class="lia-mention lia-mention-user"&gt;DianeUmu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try the following Dax.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Test =
var _mindate=
IF(
    [SMRR Gain]=BLANK(),BLANK(),
MINX(FILTER(ALLSELECTED('vm_fct_store_month_360'),[SMRR Gain]&amp;lt;&amp;gt;BLANK()),[LAST_CALENDAR_DATE]))
var _maxdate=
IF(
    [SMRR Gain]=BLANK(),BLANK(),
MAXX(FILTER(ALLSELECTED('vm_fct_store_month_360'),[SMRR Gain]&amp;lt;&amp;gt;BLANK()),[LAST_CALENDAR_DATE]))
return
SUMX(    FILTER(ALLSELECTED('vm_fct_store_month_360'),'vm_fct_store_month_360'[LAST_CALENDAR_DATE]=_mindate),[SMRR Gain])
-
SUMX( FILTER(ALLSELECTED('vm_fct_store_month_360'),'vm_fct_store_month_360'[LAST_CALENDAR_DATE]=_maxdate),[SMRR Gain])&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;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2023 07:39:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-12-20T07:39:29Z</dc:date>
    <item>
      <title>DAX Formula</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-Formula/m-p/3591793#M45864</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I'm using the above DAX to get selected month values and same period last year value of the selected date and I want now to calculate the difference between the 2. Below is the result from above DAX.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need to calculate difference between the two dates, 11/30/2023 being selected date and 11/22/2022 being start date.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 16:03:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-Formula/m-p/3591793#M45864</guid>
      <dc:creator>DianeUmu</dc:creator>
      <dc:date>2023-12-19T16:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Formula</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-Formula/m-p/3593040#M45901</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="660950" data-lia-user-login="DianeUmu" class="lia-mention lia-mention-user"&gt;DianeUmu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try the following Dax.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Test =
var _mindate=
IF(
    [SMRR Gain]=BLANK(),BLANK(),
MINX(FILTER(ALLSELECTED('vm_fct_store_month_360'),[SMRR Gain]&amp;lt;&amp;gt;BLANK()),[LAST_CALENDAR_DATE]))
var _maxdate=
IF(
    [SMRR Gain]=BLANK(),BLANK(),
MAXX(FILTER(ALLSELECTED('vm_fct_store_month_360'),[SMRR Gain]&amp;lt;&amp;gt;BLANK()),[LAST_CALENDAR_DATE]))
return
SUMX(    FILTER(ALLSELECTED('vm_fct_store_month_360'),'vm_fct_store_month_360'[LAST_CALENDAR_DATE]=_mindate),[SMRR Gain])
-
SUMX( FILTER(ALLSELECTED('vm_fct_store_month_360'),'vm_fct_store_month_360'[LAST_CALENDAR_DATE]=_maxdate),[SMRR Gain])&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;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 07:39:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-Formula/m-p/3593040#M45901</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-20T07:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Formula</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-Formula/m-p/3643937#M48812</link>
      <description>&lt;P&gt;Liu, The formula worked, However I want to have the difference between the two dates in the same measure and the output should look like this&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Basically have differenece value next to 11/30/2023.&lt;BR /&gt;Please advice.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 16:55:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-Formula/m-p/3643937#M48812</guid>
      <dc:creator>DianeUmu</dc:creator>
      <dc:date>2024-01-17T16:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Formula</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-Formula/m-p/3643954#M48813</link>
      <description>&lt;P&gt;And using the formula that you provided, It's giving me the same amount for the 2 dates without the difference.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 17:02:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-Formula/m-p/3643954#M48813</guid>
      <dc:creator>DianeUmu</dc:creator>
      <dc:date>2024-01-17T17:02:26Z</dc:date>
    </item>
  </channel>
</rss>

