<?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 help me with the dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/help-me-with-the-dax/m-p/3917976#M152507</link>
    <description>&lt;P&gt;Hi All,&lt;BR /&gt;I Want to fetch the Values for all the months in the slicer from the below dax1.&lt;BR /&gt;i have 2 dax's where dax1 is fetching correct values(totals) but month slicer for prev month selection displaying blank and other dax2 not correct value (totals) but fetching for all months with month slicer. so can anyone help me in modifying DAX1 (HC new).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;dax used are:&lt;BR /&gt;&lt;STRONG&gt;Dax1(prev month and year not fetching values but value is correct)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HC new =&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VAR &lt;SPAN&gt;MaxActivityDate = &lt;SPAN&gt;MAX(sales_snap[Activitydate])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RETURN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;IF(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;TODAY() = &lt;SPAN&gt;MaxActivityDate,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;SUM(sales_snap[HeadCount]),&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;FILTER(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sales_snap,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sales_snap[Activitydate] = &lt;SPAN&gt;MaxActivityDate&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&lt;STRONG&gt;DAX2(prev month and year fetching values but value is incorrect)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;SPAN&gt;HeadCount = &lt;SPAN&gt;CALCULATE&lt;SPAN&gt;(&lt;SPAN&gt;SUM&lt;SPAN&gt;(&lt;SPAN&gt;sales_snap&lt;SPAN&gt;[HeadCount]&lt;SPAN&gt;),&lt;SPAN&gt;LASTDATE&lt;SPAN&gt;(&lt;SPAN&gt;sales_snap&lt;SPAN&gt;[Activitydate]&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;img /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 May 2024 19:00:18 GMT</pubDate>
    <dc:creator>iyanaardnas1</dc:creator>
    <dc:date>2024-05-14T19:00:18Z</dc:date>
    <item>
      <title>help me with the dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/help-me-with-the-dax/m-p/3917976#M152507</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;I Want to fetch the Values for all the months in the slicer from the below dax1.&lt;BR /&gt;i have 2 dax's where dax1 is fetching correct values(totals) but month slicer for prev month selection displaying blank and other dax2 not correct value (totals) but fetching for all months with month slicer. so can anyone help me in modifying DAX1 (HC new).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;dax used are:&lt;BR /&gt;&lt;STRONG&gt;Dax1(prev month and year not fetching values but value is correct)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HC new =&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VAR &lt;SPAN&gt;MaxActivityDate = &lt;SPAN&gt;MAX(sales_snap[Activitydate])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RETURN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;IF(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;TODAY() = &lt;SPAN&gt;MaxActivityDate,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;SUM(sales_snap[HeadCount]),&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;FILTER(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sales_snap,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sales_snap[Activitydate] = &lt;SPAN&gt;MaxActivityDate&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&lt;STRONG&gt;DAX2(prev month and year fetching values but value is incorrect)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;SPAN&gt;HeadCount = &lt;SPAN&gt;CALCULATE&lt;SPAN&gt;(&lt;SPAN&gt;SUM&lt;SPAN&gt;(&lt;SPAN&gt;sales_snap&lt;SPAN&gt;[HeadCount]&lt;SPAN&gt;),&lt;SPAN&gt;LASTDATE&lt;SPAN&gt;(&lt;SPAN&gt;sales_snap&lt;SPAN&gt;[Activitydate]&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;img /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 May 2024 19:00:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/help-me-with-the-dax/m-p/3917976#M152507</guid>
      <dc:creator>iyanaardnas1</dc:creator>
      <dc:date>2024-05-14T19:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: help me with the dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/help-me-with-the-dax/m-p/3918205#M152515</link>
      <description>&lt;P&gt;any answers?&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 18:07:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/help-me-with-the-dax/m-p/3918205#M152515</guid>
      <dc:creator>iyanaardnas1</dc:creator>
      <dc:date>2024-05-14T18:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: help me with the dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/help-me-with-the-dax/m-p/3918725#M152536</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="742887" data-lia-user-login="iyanaardnas1" class="lia-mention lia-mention-user"&gt;iyanaardnas1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can try to use the following measure formulas if it suitable for your requirement:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;HC new =
VAR MaxActivityDate =
    MAX ( sales_snap[Activitydate] )
RETURN
    IF (
        TODAY () = MaxActivityDate,
        CALCULATE (
            SUM ( sales_snap[HeadCount] ),
            FILTER (
                ALLSELECTED ( sales_snap ),
                sales_snap[Activitydate] = MaxActivityDate
            )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 01:33:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/help-me-with-the-dax/m-p/3918725#M152536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-15T01:33:48Z</dc:date>
    </item>
  </channel>
</rss>

