<?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: Incorrect Previous month total in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1486558#M617618</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="164152" data-lia-user-login="Uzi2019" class="lia-mention lia-mention-user"&gt;Uzi2019&lt;/a&gt; , for time intelligence use date table, any missing date will cause the issue &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;var prev= CALCULATE(SUM(Channel[Cost]),DATEADD('DATE'[date],-1,MONTH))&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;var curr= CALCULATE(SUM(Channel[Cost]))&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;var Ans= Divide([curr]-[prev]),[prev],0) //Avoid - as that will convert it into a text , use divide &lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&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;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; &lt;STRONG&gt;Appreciate your Kudos.&lt;/STRONG&gt; &lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Wed, 11 Nov 2020 07:49:33 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-11-11T07:49:33Z</dc:date>
    <item>
      <title>Incorrect Previous month total</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1486515#M617610</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to show percentage of previous month. After creating formula&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Previous Cost = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var prev= CALCULATE(SUM(Channel[Cost]),DATEADD(Channel[date],-1,MONTH))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var curr= CALCULATE(SUM(Channel[Cost]))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var Ans= IFERROR(((curr-prev)/prev),"-")&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;return Ans&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Row wise it is showing correct answer but total showing incorrect value.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;prev got this value instead of 268642.83&amp;nbsp; total it is showing 2601461.69.&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;I dont know why I am getting incorrect result in Total only. row wise showing correct value.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Correct answer should be "-0.34" in "Previous cost total"&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;(176062.52-268642.83)/268642.83= -0.34&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please help me to solve this issue.&lt;/DIV&gt;&lt;DIV&gt;Thank you in advance.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 11 Nov 2020 07:39:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1486515#M617610</guid>
      <dc:creator>Uzi2019</dc:creator>
      <dc:date>2020-11-11T07:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Previous month total</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1486558#M617618</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="164152" data-lia-user-login="Uzi2019" class="lia-mention lia-mention-user"&gt;Uzi2019&lt;/a&gt; , for time intelligence use date table, any missing date will cause the issue &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;STRONG&gt;var prev= CALCULATE(SUM(Channel[Cost]),DATEADD('DATE'[date],-1,MONTH))&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;var curr= CALCULATE(SUM(Channel[Cost]))&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;var Ans= Divide([curr]-[prev]),[prev],0) //Avoid - as that will convert it into a text , use divide &lt;BR /&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&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;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; &lt;STRONG&gt;Appreciate your Kudos.&lt;/STRONG&gt; &lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 11 Nov 2020 07:49:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1486558#M617618</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-11T07:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Previous month total</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1486569#M617625</link>
      <description>&lt;P&gt;Hi&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;,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;As I mentioned, I am getting incorrect Prev Month Total which leads to incorrect MoM Growth. So first we have to rectify previous month figure. Individual rows are coming correctly but total is incorrect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 07:53:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1486569#M617625</guid>
      <dc:creator>Uzi2019</dc:creator>
      <dc:date>2020-11-11T07:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Previous month total</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1486681#M617654</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="164152" data-lia-user-login="Uzi2019" class="lia-mention lia-mention-user"&gt;Uzi2019&lt;/a&gt; , dateadd need the continuous date, so if the date is not present in table or last month the same date is not present it will give the wrong answer. That is why we need to use date table, which has continous date&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example, see for the date where I do not have one month old dates. Any mssing date in this month and last month can casue diff&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 08:54:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1486681#M617654</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-11T08:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Previous month total</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1489248#M618279</link>
      <description>&lt;P&gt;Hi&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;,&lt;/P&gt;&lt;P&gt;I have continuous dates. Thats why Row wise i got correct answer. only problem is with Total.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;See above data is there for 1 2 and 3rd oct and nov. but still got incorrect total.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;See Row wise prev is correct only total is incorrect. it sould be &lt;STRONG&gt;268642.83.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have also created same thing using calendar table still getting incorrect and blank answer.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 08:25:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1489248#M618279</guid>
      <dc:creator>Uzi2019</dc:creator>
      <dc:date>2020-11-12T08:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Previous month total</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1491468#M618728</link>
      <description>&lt;P&gt;Hi, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="164152" data-lia-user-login="Uzi2019" class="lia-mention lia-mention-user"&gt;Uzi2019&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your picture and description, I guess that you want to make the total row of [prev] display the correct total value, you can create a new measure [prev_new]:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;prev_new =

var _new=SUMMARIZE('Table','Table'[date],"_value",[prev])

return IF(HASONEVALUE('Table'[date]),[prev],SUMX(_new,[_value]))&lt;/LI-CODE&gt;
&lt;P&gt;You should replace the ‘Table’ with your table name, and place this measure into the table chart.&lt;/P&gt;
&lt;P&gt;And you can get what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this result is not what you want, you can post some sample data(without sensitive data) so that we can help you in advance.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://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&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&amp;nbsp;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Robert Qin&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 01:41:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Incorrect-Previous-month-total/m-p/1491468#M618728</guid>
      <dc:creator>v-robertq-msft</dc:creator>
      <dc:date>2020-11-13T01:41:28Z</dc:date>
    </item>
  </channel>
</rss>

