<?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: Display Sales by Quarter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4125637#M163836</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="799156" data-lia-user-login="Samurai_" class="lia-mention lia-mention-user"&gt;Samurai_&lt;/a&gt;, try these measures below, and if you encounter any issues, let me know.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Last Quarter Sales = 
CALCULATE(
    SUM(Sales[Amount]),
    DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -1, QUARTER)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2 Quarters Ago Sales = 
CALCULATE(
    SUM(Sales[Amount]),
    DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -2, QUARTER)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;3 Quarters Ago Sales = 
CALCULATE(
    SUM(Sales[Amount]),
    DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -3, QUARTER)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;4 Quarters Ago Sales = 
CALCULATE(
    SUM(Sales[Amount]),
    DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -4, QUARTER)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="center"&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Did I answer your question?&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;If so, please mark my post as the solution! &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Your Kudos are much appreciated!&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Proud to be a Solution Supplier!&lt;/STRONG&gt;&lt;/FONT&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2024 19:55:16 GMT</pubDate>
    <dc:creator>ahadkarimi</dc:creator>
    <dc:date>2024-08-29T19:55:16Z</dc:date>
    <item>
      <title>Display Sales by Quarter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4125624#M163833</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking to try to display the total of sales within the last 4 quarters while keeping the same Carrier accross each quarter on the same line throughout the display.&amp;nbsp;&lt;BR /&gt;I tried using small multuiples however I couldnt get it to display correctly but still think small multuiples is the way to get it to work.&lt;BR /&gt;Here is a sample of data.&amp;nbsp;The start is before or on the quarter start date and the end date is after that date. So if I was looking at this today 8/29/24, the following would show up in each section.&amp;nbsp;&lt;BR /&gt;Last Quarter:&amp;nbsp;Policy 1&amp;nbsp;Policy 2&amp;nbsp;Policy 3&amp;nbsp;Policy 4&amp;nbsp;&lt;BR /&gt;2 Quarters Ago:&amp;nbsp;Policy 1&amp;nbsp;Policy 2&amp;nbsp;Policy 4&amp;nbsp;&lt;BR /&gt;3 Quarters Ago:&amp;nbsp;Policy 1&amp;nbsp;Policy 2&amp;nbsp;Policy 4&amp;nbsp;Policy 6&lt;BR /&gt;4 Quarters Ago:&amp;nbsp;Policy 2&amp;nbsp;Policy 4&amp;nbsp;Policy 5&amp;nbsp;Policy 6&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;Above is what it looks like right now but what i'm trying to get it to look like is this (blocked names but kept a few letters to show that it is one carrier in the same position accross the whole row)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm still new to power bi so any help would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 20:49:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4125624#M163833</guid>
      <dc:creator>Samurai_</dc:creator>
      <dc:date>2024-08-29T20:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Display Sales by Quarter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4125637#M163836</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="799156" data-lia-user-login="Samurai_" class="lia-mention lia-mention-user"&gt;Samurai_&lt;/a&gt;, try these measures below, and if you encounter any issues, let me know.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Last Quarter Sales = 
CALCULATE(
    SUM(Sales[Amount]),
    DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -1, QUARTER)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2 Quarters Ago Sales = 
CALCULATE(
    SUM(Sales[Amount]),
    DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -2, QUARTER)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;3 Quarters Ago Sales = 
CALCULATE(
    SUM(Sales[Amount]),
    DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -3, QUARTER)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;4 Quarters Ago Sales = 
CALCULATE(
    SUM(Sales[Amount]),
    DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -4, QUARTER)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="center"&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Did I answer your question?&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;If so, please mark my post as the solution! &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Your Kudos are much appreciated!&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Proud to be a Solution Supplier!&lt;/STRONG&gt;&lt;/FONT&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 19:55:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4125637#M163836</guid>
      <dc:creator>ahadkarimi</dc:creator>
      <dc:date>2024-08-29T19:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Display Sales by Quarter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4125657#M163838</link>
      <description>&lt;P&gt;I cant put measure data fields into "Small Multiples" section. Is there another way to display this?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 20:24:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4125657#M163838</guid>
      <dc:creator>Samurai_</dc:creator>
      <dc:date>2024-08-29T20:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Display Sales by Quarter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4126693#M163871</link>
      <description>&lt;P&gt;Thanks for the reply from ahadkarimi&amp;nbsp;, please allow me to provide another insight:&amp;nbsp;&lt;BR /&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="799156" data-lia-user-login="Samurai_" class="lia-mention lia-mention-user"&gt;Samurai_&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 table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 =
var _date=
CALENDAR(
    DATE(2022,1,1),DATE(2026,12,31))
return
ADDCOLUMNS(
    _date,"Qu",YEAR([Date])&amp;amp;" Q"&amp;amp;QUARTER([Date]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Qu =
CONCATENATEX(
    FILTER(ALL('Table 2'),
    'Table 2'[Date]&amp;gt;='Table'[Start Date]&amp;amp;&amp;amp;'Table 2'[Date]&amp;lt;='Table'[End Date]),'Table 2'[Qu],"-")&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Enter data – flag_Table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;4. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag_last1 =
var _today=TODAY()
var _lastdate=EOMONTH(_today,-3)
var _qu=YEAR(_lastdate)&amp;amp;" Q"&amp;amp;QUARTER(_lastdate)
return
SUMX(
    FILTER('Table',
CONTAINSSTRING(
    MAX('Table'[Qu]),_qu)=TRUE()),[Value])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Flag_last2 =
var _today=TODAY()
var _lastdate=EOMONTH(_today,-6)
var _qu=YEAR(_lastdate)&amp;amp;" Q"&amp;amp;QUARTER(_lastdate)
return
SUMX(
    FILTER('Table',
CONTAINSSTRING(
    MAX('Table'[Qu]),_qu)=TRUE()),[Value])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Flag_last3 =
var _today=TODAY()
var _lastdate=EOMONTH(_today,-9)
var _qu=YEAR(_lastdate)&amp;amp;" Q"&amp;amp;QUARTER(_lastdate)
return
SUMX(
    FILTER('Table',
CONTAINSSTRING(
    MAX('Table'[Qu]),_qu)=TRUE()),[Value])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Flag_last4 =
var _today=TODAY()
var _lastdate=EOMONTH(_today,-12)
var _qu=YEAR(_lastdate)&amp;amp;" Q"&amp;amp;QUARTER(_lastdate)
return
SUMX(
    FILTER('Table',
CONTAINSSTRING(
    MAX('Table'[Qu]),_qu)=TRUE()),[Value])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure =
SWITCH(
    TRUE(),
    MAX('Flag_Table'[Flag])="Flag1",[Flag_last1],
    MAX('Flag_Table'[Flag])="Flag2",[Flag_last2],
    MAX('Flag_Table'[Flag])="Flag3",[Flag_last3],
    MAX('Flag_Table'[Flag])="Flag4",[Flag_last4])&lt;/LI-CODE&gt;
&lt;P&gt;5. Result:&lt;/P&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>Fri, 30 Aug 2024 09:25:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4126693#M163871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-30T09:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Display Sales by Quarter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4135879#M164284</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;This is great and just what I was looking for!&lt;/P&gt;&lt;P&gt;It looks like there is something wrong with the way its summing within the graphs. For example Flag1 should not be 12k for Carrier 4. Carrier 4 should display 4.7k.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 16:20:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Display-Sales-by-Quarter/m-p/4135879#M164284</guid>
      <dc:creator>Samurai_</dc:creator>
      <dc:date>2024-09-05T16:20:15Z</dc:date>
    </item>
  </channel>
</rss>

