<?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: Getting the sales value from last month but on the exact weekday in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3419384#M129425</link>
    <description>&lt;P&gt;Hi, Thanks this is correctly picking out the previous dates now, I have spot checked and look good. I cannot seem to use that measure to pull back the sales value from that historical date though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I want ideally to show the sales amount for 7th Sept with the sales value from the 3rd August as a side by side. Is that possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2023 09:49:50 GMT</pubDate>
    <dc:creator>ChrisA27</dc:creator>
    <dc:date>2023-09-07T09:49:50Z</dc:date>
    <item>
      <title>Getting the sales value from last month but on the exact weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3415398#M129210</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering anyone can help me out? I am trying to get a sales value from the same day in the previous month. I have date table in place and I need to go back a month and compare the sale for example Wednesday 2nd August against the Wednesday one month ago which would be Wednesday the 5th July. Its a very seasonal business so can't just use same date last month as that won't be the same day and weekend would be busier than week days etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per screenshot I have managed to go back and find the correct date but I am struggling to get a DAX measure to pull back the value at that date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentialy just trying to see what we did on that day the previous month.&lt;/P&gt;&lt;P&gt;&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;Any help would be amazing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 10:19:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3415398#M129210</guid>
      <dc:creator>ChrisA27</dc:creator>
      <dc:date>2023-09-05T10:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sales value from last month but on the exact weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3415447#M129212</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612621" data-lia-user-login="ChrisA27" class="lia-mention lia-mention-user"&gt;ChrisA27&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take a look at these threads:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Working-with-SAMEPERIODLASTYEAR-on-a-Day-of-Week-basis/td-p/1606189" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/Desktop/Working-with-SAMEPERIODLASTYEAR-on-a-Day-of-Week-basis/td-p/1606189&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Comparing-same-period-to-last-year-Monday-TY-to-Monday-LY/td-p/2181248" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/Desktop/Comparing-same-period-to-last-year-Monday-TY-to-Monday-LY/td-p/2181248&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 10:38:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3415447#M129212</guid>
      <dc:creator>mlsx4</dc:creator>
      <dc:date>2023-09-05T10:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sales value from last month but on the exact weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3419180#M129418</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612621" data-lia-user-login="ChrisA27" class="lia-mention lia-mention-user"&gt;ChrisA27&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Week =
WEEKNUM('Table'[Date],2)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Day =
WEEKDAY('Table'[Date],2)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Index =
RANKX(
    FILTER(ALL('Table'),    YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&amp;amp;&amp;amp;MONTH('Table'[Date])==MONTH(EARLIER('Table'[Date]))&amp;amp;&amp;amp;
    'Table'[Day]=EARLIER('Table'[Day])),'Table'[Date],,ASC)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;True =
MAXX(
    FILTER(ALL('Table'),
    YEAR('Table'[Date])=YEAR(MAX('Table'[Date]))&amp;amp;&amp;amp;
    MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))-1&amp;amp;&amp;amp;
    'Table'[Day]=MAX('Table'[Day])&amp;amp;&amp;amp;'Table'[Index]=MAX('Table'[Index])),[Date])&lt;/LI-CODE&gt;
&lt;P&gt;3. Result:&lt;/P&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>Thu, 07 Sep 2023 08:01:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3419180#M129418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-07T08:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sales value from last month but on the exact weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3419384#M129425</link>
      <description>&lt;P&gt;Hi, Thanks this is correctly picking out the previous dates now, I have spot checked and look good. I cannot seem to use that measure to pull back the sales value from that historical date though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I want ideally to show the sales amount for 7th Sept with the sales value from the 3rd August as a side by side. Is that possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 09:49:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3419384#M129425</guid>
      <dc:creator>ChrisA27</dc:creator>
      <dc:date>2023-09-07T09:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sales value from last month but on the exact weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3419407#M129426</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612621" data-lia-user-login="ChrisA27" class="lia-mention lia-mention-user"&gt;ChrisA27&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;“show the sales amount for 7th Sept with the sales value from the 3rd August as a side by side”&lt;/P&gt;
&lt;P&gt;It's not clear what this text means, do you mean to show both the previous and next month's dates in the current date?&lt;/P&gt;
&lt;P&gt;Measure：&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;next =
MAXX(
    FILTER(ALL('Table'),
    YEAR('Table'[Date])=YEAR(MAX('Table'[Date]))&amp;amp;&amp;amp;
    MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))+1&amp;amp;&amp;amp;
    'Table'[Day]=MAX('Table'[Day])&amp;amp;&amp;amp;'Table'[Index]=MAX('Table'[Index])),[Date])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Thu, 07 Sep 2023 10:07:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3419407#M129426</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-07T10:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sales value from last month but on the exact weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3419428#M129427</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The repsonse actually its super useful for forecasting. Thanks. But what I mean't was I want present like shown below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Mocked up in Excel)&lt;/P&gt;&lt;P&gt;&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;So based on the Calc and measure you provided I can get dates back fine to find the value but it doesn't let me use the measure in any form of calculations to be able to get the Gross Sales value same day previous month value. Hope that makes sense!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 10:16:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3419428#M129427</guid>
      <dc:creator>ChrisA27</dc:creator>
      <dc:date>2023-09-07T10:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sales value from last month but on the exact weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3426630#M129838</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is along the right lines now, how can I make that a calculated column instead of a measure? I the MAXX treats the date differently to a measure so would be interested how you get into column instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 15:06:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3426630#M129838</guid>
      <dc:creator>ChrisA27</dc:creator>
      <dc:date>2023-09-12T15:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sales value from last month but on the exact weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3428199#M129951</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612621" data-lia-user-login="ChrisA27" class="lia-mention lia-mention-user"&gt;ChrisA27&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry to reply you now, if you want to change it to a calculated column, you can change max() to the Earlier() function, and the Earlier() function represents the current row in the calculated column.&lt;/P&gt;
&lt;P&gt;Refer to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/earlier-function-dax" target="_blank"&gt;EARLIER function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;next_column =
MAXX(
    FILTER(ALL('Table'),
    YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&amp;amp;&amp;amp;
    MONTH('Table'[Date])=MONTH(EARLIER('Table'[Date]))+1&amp;amp;&amp;amp;
    'Table'[Day]=EARLIER('Table'[Day])&amp;amp;&amp;amp;'Table'[Index]=EARLIER('Table'[Index])),[Date])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;True_column =
MAXX(
    FILTER(ALL('Table'),
    YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&amp;amp;&amp;amp;
    MONTH('Table'[Date])=MONTH(EARLIER('Table'[Date]))-1&amp;amp;&amp;amp;
    'Table'[Day]=EARLIER('Table'[Day])&amp;amp;&amp;amp;'Table'[Index]=EARLIER('Table'[Index])),[Date])&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, 13 Sep 2023 09:45:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3428199#M129951</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-13T09:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the sales value from last month but on the exact weekday</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3430443#M130036</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much this is now working as a column. So one last thing I wanted to achieve is creating a visual (Table is fine) of sales values for each of those dates in the column in a side by side view with the current months values. Seems simple yet I can't seem to get it to work. I am used to just using the predefined DAX of PREVIOUSMONTH for example but it won't work for this scenario due to needing the exact day of the week it fell on previously.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sales&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sales 1 Month Previous same day of week&lt;/P&gt;&lt;P&gt;13/09/23&amp;nbsp; |&amp;nbsp; 1000.00 |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;850.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to get trends of day of the week in prior months to assist with Rota planning for the next week.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 08:57:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-the-sales-value-from-last-month-but-on-the-exact-weekday/m-p/3430443#M130036</guid>
      <dc:creator>ChrisA27</dc:creator>
      <dc:date>2023-09-14T08:57:51Z</dc:date>
    </item>
  </channel>
</rss>

