<?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: Obtaining last month graphic while using a date slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2613328#M75855</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313840" data-lia-user-login="ruesaint_denis" class="lia-mention lia-mention-user"&gt;ruesaint_denis&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;# Accredited Users (time based -1 month) =
CALCULATE (
    DISTINCTCOUNT ( Users[User Id] ),
    FILTER ( Users, Users[Accredited Status] = "ACCREDITED" ),
    FILTER (
        ALL ( 'Date Table' ),
        EOMONTH ( [Date], 0 ) = EOMONTH ( MAX ( Users[Date] ), -1 )
    ),
    USERELATIONSHIP ( Users[Date], 'Date Table'[Date] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&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, 01 Jul 2022 05:33:50 GMT</pubDate>
    <dc:creator>v-yalanwu-msft</dc:creator>
    <dc:date>2022-07-01T05:33:50Z</dc:date>
    <item>
      <title>Obtaining last month graphic while using a date slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2607968#M75544</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to show the selected month and previous month data, allowing for the user to select a month via a Month Year slicer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a User table, and a Date table. My Date table has month offset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure what I need to do to my measures, for it to still be able to take into consideration the selected month, but show me the values of the selected month -1. When I try to do that in my measure, shows up blank (the 3rd bar from the top on the "Previous Month" funnel).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't tell it to ignore the Month Year filter, because I need it in the calculation, to subtract by month offset -1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of how I tried to filter for the previous month within my measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Accredited Users (time based -1 month) = CALCULATE(DISTINCTCOUNT(Users[User Id]), FILTER(Users, Users[Accredited Status]="ACCREDITED" ), FILTER(ALLSELECTED('Date Table'), 'Date Table'[Month Offset]=-1), USERELATIONSHIP(Users[Date],'Date Table'[Date]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But since I have the Date slicer on, it's not showing any data outside of the date slicer range.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 22:31:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2607968#M75544</guid>
      <dc:creator>ruesaint_denis</dc:creator>
      <dc:date>2022-06-28T22:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining last month graphic while using a date slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2608279#M75556</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313840" data-lia-user-login="ruesaint_denis" class="lia-mention lia-mention-user"&gt;ruesaint_denis&lt;/a&gt; , You can use time intellignece with date table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))&lt;BR /&gt;last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))&lt;/P&gt;
&lt;P&gt;previous month value = CALCULATE(sum('Table'[total hours value]),previousmonth('Date'[Date]))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For offset you need month rank (either on month start date or YYYYMM)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Month Rank = RANKX(all('Date'),'Date'[Month Start date],,ASC,Dense) &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Month = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Month Rank]=max('Date'[Month Rank])))&lt;BR /&gt;Last Month = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Month Rank]=max('Date'[Month Rank])-1))&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 03:58:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2608279#M75556</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-06-29T03:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining last month graphic while using a date slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2613328#M75855</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313840" data-lia-user-login="ruesaint_denis" class="lia-mention lia-mention-user"&gt;ruesaint_denis&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;# Accredited Users (time based -1 month) =
CALCULATE (
    DISTINCTCOUNT ( Users[User Id] ),
    FILTER ( Users, Users[Accredited Status] = "ACCREDITED" ),
    FILTER (
        ALL ( 'Date Table' ),
        EOMONTH ( [Date], 0 ) = EOMONTH ( MAX ( Users[Date] ), -1 )
    ),
    USERELATIONSHIP ( Users[Date], 'Date Table'[Date] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&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, 01 Jul 2022 05:33:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2613328#M75855</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-07-01T05:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining last month graphic while using a date slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2620915#M76337</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&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;, Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, I tried both recommendations and ended up debugging to the following:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE([# Accredited Users (time based)],DATEADD('Date Table'[Date],-1,MONTH))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 05 Jul 2022 22:08:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2620915#M76337</guid>
      <dc:creator>ruesaint_denis</dc:creator>
      <dc:date>2022-07-05T22:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining last month graphic while using a date slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2621053#M76346</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313840" data-lia-user-login="ruesaint_denis" class="lia-mention lia-mention-user"&gt;ruesaint_denis&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Has the result of the final debugging solved your problem? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yalan Wu&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&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;</description>
      <pubDate>Wed, 06 Jul 2022 01:13:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Obtaining-last-month-graphic-while-using-a-date-slicer/m-p/2621053#M76346</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2022-07-06T01:13:25Z</dc:date>
    </item>
  </channel>
</rss>

