<?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: QOQ Distinct Accounts calculation in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419472#M599467</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225425" data-lia-user-login="BItoken" class="lia-mention lia-mention-user"&gt;BItoken&lt;/a&gt; , In case you Qtr Start from Jan, Apr,Jul or Oct. You can use time intelligence. DatesQTD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))&lt;BR /&gt;Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))&lt;/P&gt;
&lt;P&gt;Last complete QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD( ENDOFQUARTER(dateadd('Date'[Date],-1,QUARTER))))&lt;BR /&gt;Last to last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-2,QUARTER)))&lt;BR /&gt;Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,Year)))&lt;BR /&gt;Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(ENDOFQUARTER(dateadd('Date'[Date],-1,Year))))&lt;BR /&gt;trailing QTR = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,QUARTER))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;In case Qtr does start with those for month. You need use qtr start date / YYYYQQ format to create&amp;nbsp; Rank and use that. This can done in date table or QTR table. But should be separate table&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Qtr Start Date = DATEADD(STARTOFYEAR('Date'[Date],"4/30"),QUOTIENT(DATEDIFF('Date'[Start Of Year], 'Date'[Date],MONTH),3)*3,MONTH)&lt;BR /&gt;Qtr Month No = DATEDIFF('Date'[Qtr Start Date],'Date'[Date],MONTH)+1&lt;BR /&gt;Qtr Rank = RANKX(all('Date'),'Date'[Qtr Start date],,ASC,Dense) &lt;BR /&gt;This Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))&lt;BR /&gt;Last Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer : &lt;BR /&gt;&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions&lt;/A&gt; &lt;BR /&gt;&lt;A href="https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi" target="_blank"&gt;https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Appreciate your Kudos.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2020 00:56:21 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-10-08T00:56:21Z</dc:date>
    <item>
      <title>QOQ Distinct Accounts calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419404#M599450</link>
      <description>&lt;P&gt;Hi All, We have started collecting data since the last 2 quarters on accounts and we&amp;nbsp;have a rolled up date field which is date for the Quarter end and im trying to get the QOQ for the current quarter see in pic below. The QOQ will have to be updated after each qtr going forward and the data is being captured.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried various DAX functions to calculate this but do not get a result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;measure = CALCULATE(DISTINCTCOUNT(account_id), end_period = MAX(end_period)-1)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Get an error:&amp;nbsp;A function 'MAX' has been used in a True/False expression that is used as a table filter expression. This is not allowed.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&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 and suggestions is much appreciated!!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 00:10:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419404#M599450</guid>
      <dc:creator>BItoken</dc:creator>
      <dc:date>2020-10-08T00:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: QOQ Distinct Accounts calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419472#M599467</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225425" data-lia-user-login="BItoken" class="lia-mention lia-mention-user"&gt;BItoken&lt;/a&gt; , In case you Qtr Start from Jan, Apr,Jul or Oct. You can use time intelligence. DatesQTD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))&lt;BR /&gt;Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))&lt;/P&gt;
&lt;P&gt;Last complete QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD( ENDOFQUARTER(dateadd('Date'[Date],-1,QUARTER))))&lt;BR /&gt;Last to last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-2,QUARTER)))&lt;BR /&gt;Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,Year)))&lt;BR /&gt;Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(ENDOFQUARTER(dateadd('Date'[Date],-1,Year))))&lt;BR /&gt;trailing QTR = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,QUARTER))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;In case Qtr does start with those for month. You need use qtr start date / YYYYQQ format to create&amp;nbsp; Rank and use that. This can done in date table or QTR table. But should be separate table&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Qtr Start Date = DATEADD(STARTOFYEAR('Date'[Date],"4/30"),QUOTIENT(DATEDIFF('Date'[Start Of Year], 'Date'[Date],MONTH),3)*3,MONTH)&lt;BR /&gt;Qtr Month No = DATEDIFF('Date'[Qtr Start Date],'Date'[Date],MONTH)+1&lt;BR /&gt;Qtr Rank = RANKX(all('Date'),'Date'[Qtr Start date],,ASC,Dense) &lt;BR /&gt;This Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))&lt;BR /&gt;Last Qtr = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer : &lt;BR /&gt;&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions&lt;/A&gt; &lt;BR /&gt;&lt;A href="https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi" target="_blank"&gt;https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Appreciate your Kudos.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 00:56:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419472#M599467</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-10-08T00:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: QOQ Distinct Accounts calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419640#M599515</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/148838" target="_blank"&gt;@amitchandak&lt;/A&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;I already have the Quarter infor derived from the end of period date which is "FQ" so not sure how the calcs you mentioned will help here. Also, our FY Q1 starts in April to June and FY Q4 ends in Jan to March. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 02:11:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419640#M599515</guid>
      <dc:creator>BItoken</dc:creator>
      <dc:date>2020-10-08T02:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: QOQ Distinct Accounts calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419763#M599555</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Share the link from where i can download your PBI file.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 02:51:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419763#M599555</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2020-10-08T02:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: QOQ Distinct Accounts calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419824#M599577</link>
      <description>&lt;P&gt;&lt;A title="PBIX File Sample" href="https://1drv.ms/u/s!Astvd3j6-QR0c5SaviFjhg1vhew?e=2gCbxJ" target="_self"&gt;https://1drv.ms/u/s!Astvd3j6-QR0c5SaviFjhg1vhew?e=2gCbxJ&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;&amp;nbsp; here is a sample of the pbix file&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 03:18:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419824#M599577</guid>
      <dc:creator>BItoken</dc:creator>
      <dc:date>2020-10-08T03:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: QOQ Distinct Accounts calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419825#M599578</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225425" data-lia-user-login="BItoken" class="lia-mention lia-mention-user"&gt;BItoken&lt;/a&gt; , if you have a date you can use a date table and use DatesQTD formula.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Else you have to opt for the Rank way&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Qtr on Qtr with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 03:19:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1419825#M599578</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-10-08T03:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: QOQ Distinct Accounts calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1422324#M600247</link>
      <description>&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&amp;nbsp; the rank func does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it because im deiving the Q from the end date which is already rolled up to show just one date (End of Qtr)&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 22:10:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1422324#M600247</guid>
      <dc:creator>BItoken</dc:creator>
      <dc:date>2020-10-08T22:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: QOQ Distinct Accounts calculation</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1422605#M600320</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You may download my PBI file from &lt;A href="https://1drv.ms/u/s!AnsG4LrWCkhUn_dXFYL1r-0lEdNPmA?e=1Lxf7Y" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 01:43:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/QOQ-Distinct-Accounts-calculation/m-p/1422605#M600320</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2020-10-09T01:43:23Z</dc:date>
    </item>
  </channel>
</rss>

