<?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: Sales of the last quarter when using slicer by day of the month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3029989#M103514</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="477226" data-lia-user-login="Laocsulak" class="lia-mention lia-mention-user"&gt;Laocsulak&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;
&lt;P&gt;Change the quanter column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;QUANTER = var _year=YEAR(Sheet1[created])
var _year1=YEAR(Sheet1[created])-1
var _q=QUARTER(Sheet1[created])
var _qa=QUARTER(Sheet1[created])-1
var _1re=
_year&amp;amp;"/"&amp;amp;"Q"&amp;amp;_qa
return
IF(_q=1,_year1&amp;amp;"/"&amp;amp;"Q"&amp;amp;4,_1re)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;and it is&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;affected by the slicer.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If it still does not help,Please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 01:36:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-19T01:36:37Z</dc:date>
    <item>
      <title>Sales of the last quarter when using slicer by day of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3026260#M103202</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have created a measure that show the sales of the last quarter and works fine, but when I use a slicer to filter by the number day of the month it keeps showing the sales of the entire month. Does anyone know how to adapt the measure to fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;This shows correctly the sales of the last quarter&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But for example if I filter to see the sales for just the first 10 days for every month of every quarter, it keeps showing the same information in the sales in the last quarter, and that's not correct.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Measure craeted:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales LQ = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; __PREV_QUARTER =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( [total sales] , &lt;/SPAN&gt;&lt;SPAN&gt;PREVIOUSQUARTER&lt;/SPAN&gt;&lt;SPAN&gt;(Calendario[Date]) )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt; ( __PREV_QUARTER ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt; (),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;( __PREV_QUARTER &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample:&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/drive/folders/1TOYezhAuiy0ADTNcKVL1ayNw5XoLMo_I?usp=share_link" target="_blank" rel="noopener"&gt;https://drive.google.com/drive/folders/1TOYezhAuiy0ADTNcKVL1ayNw5XoLMo_I?usp=share_link&lt;/A&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 15:28:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3026260#M103202</guid>
      <dc:creator>Laocsulak</dc:creator>
      <dc:date>2023-01-17T15:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sales of the last quarter when using slicer by day of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3026381#M103214</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="477226" data-lia-user-login="Laocsulak" class="lia-mention lia-mention-user"&gt;Laocsulak&lt;/a&gt; , Try if measure like this can help&lt;/P&gt;
&lt;P&gt;trailing QTR = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,QUARTER))&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 15:58:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3026381#M103214</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-01-17T15:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sales of the last quarter when using slicer by day of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3026416#M103219</link>
      <description>&lt;P&gt;I have tried that measure before, but when the quarter has not ended, it doesn't show the right amount for the previous quarter. In this example, it shows 10 instead of 24 in the last quarter.&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;</description>
      <pubDate>Tue, 17 Jan 2023 16:07:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3026416#M103219</guid>
      <dc:creator>Laocsulak</dc:creator>
      <dc:date>2023-01-17T16:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sales of the last quarter when using slicer by day of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3027375#M103281</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="477226" data-lia-user-login="Laocsulak" class="lia-mention lia-mention-user"&gt;Laocsulak&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please have a try.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Create columns and measures.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;QUANTER =
VAR _year =
    YEAR ( Sheet1[created] )
VAR _q =
    QUARTER ( Sheet1[created] )
RETURN
    _year &amp;amp; "/" &amp;amp; "Q" &amp;amp; _q
&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;DAYS = DAY(Sheet1[created])&lt;/LI-CODE&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
CALCULATE (
    SUM ( Sheet1[amount] ),
    FILTER (
        ALL ( Sheet1 ),
        Sheet1[DAYS] &amp;lt;= MAXX ( ALLSELECTED ( Calendario ), Calendario[Dia] )
            &amp;amp;&amp;amp; Sheet1[QUANTER] = SELECTEDVALUE ( Calendario[Año/trimestre] )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it still does not help,Please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 02:41:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3027375#M103281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-18T02:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sales of the last quarter when using slicer by day of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3028691#M103394</link>
      <description>&lt;P&gt;Thanks for the answer, although I have tried that and it shows the sales of the current quarter, I need to show the sales of the previous quarter, and also it's not affected by the slicer.&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;</description>
      <pubDate>Wed, 18 Jan 2023 13:06:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3028691#M103394</guid>
      <dc:creator>Laocsulak</dc:creator>
      <dc:date>2023-01-18T13:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sales of the last quarter when using slicer by day of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3029989#M103514</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="477226" data-lia-user-login="Laocsulak" class="lia-mention lia-mention-user"&gt;Laocsulak&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;
&lt;P&gt;Change the quanter column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;QUANTER = var _year=YEAR(Sheet1[created])
var _year1=YEAR(Sheet1[created])-1
var _q=QUARTER(Sheet1[created])
var _qa=QUARTER(Sheet1[created])-1
var _1re=
_year&amp;amp;"/"&amp;amp;"Q"&amp;amp;_qa
return
IF(_q=1,_year1&amp;amp;"/"&amp;amp;"Q"&amp;amp;4,_1re)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;and it is&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;affected by the slicer.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If it still does not help,Please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Polly&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 01:36:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sales-of-the-last-quarter-when-using-slicer-by-day-of-the-month/m-p/3029989#M103514</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-19T01:36:37Z</dc:date>
    </item>
  </channel>
</rss>

