<?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 Difference of values between current and previous month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2067674#M46750</link>
    <description>&lt;P&gt;Is there a way to subtract the current and previous month?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to reuse a code given to me but I keep getting this error below...&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;The formula on excel is&amp;nbsp;=IF((AW9-AW8)&amp;lt;=0,1,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and my data should be..&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please your help yould be really appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 09 Sep 2021 22:49:42 GMT</pubDate>
    <dc:creator>GA1993</dc:creator>
    <dc:date>2021-09-09T22:49:42Z</dc:date>
    <item>
      <title>Difference of values between current and previous month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2067674#M46750</link>
      <description>&lt;P&gt;Is there a way to subtract the current and previous month?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to reuse a code given to me but I keep getting this error below...&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;The formula on excel is&amp;nbsp;=IF((AW9-AW8)&amp;lt;=0,1,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and my data should be..&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please your help yould be really appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 22:49:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2067674#M46750</guid>
      <dc:creator>GA1993</dc:creator>
      <dc:date>2021-09-09T22:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Difference of values between current and previous month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068068#M46754</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307062" data-lia-user-login="GA1993" class="lia-mention lia-mention-user"&gt;GA1993&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that Start date just have the first day of each month?&lt;/P&gt;&lt;P&gt;if no, can you share a sample of your data with more details as a table here&lt;BR /&gt;If yes, try this:&lt;/P&gt;&lt;P&gt;Measure =&amp;nbsp;&lt;BR /&gt;Var _TM= Max([Start Date])&lt;BR /&gt;Var _LM = date(year(_TM),month(_TM)-1,day(_TM))&lt;BR /&gt;Var _This MonthV = Calculate(sum([Phising Website],[Start Date]=TM)&lt;BR /&gt;Var _PrevMonthV =&amp;nbsp;Calculate(sum([Phising Website],[Start Date]=LM)&lt;BR /&gt;return&lt;BR /&gt;if(_This MonthV-_PrevMonthV&amp;lt;=0,1,0)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, please consider&amp;nbsp;&lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Appreciate your Kudos&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":victory_hand:"&gt;✌️&lt;/span&gt;&lt;STRONG&gt;!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 03:41:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068068#M46754</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-09-10T03:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Difference of values between current and previous month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068087#M46757</link>
      <description>&lt;P&gt;Hi, it doesnt need to be the first day of each month. I&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;t's more of like the values under the Start Date talks about each month (ie 2018-07, 2018-08, 2018-09, and so on)&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;The following is the logic behing it:&lt;/P&gt;&lt;P&gt;AW(10)&amp;nbsp;Phishing website value (current month) -&amp;nbsp;&lt;/P&gt;&lt;P&gt;AW(9)&amp;nbsp;Phishing website value (previous month)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If (value above &amp;lt;= 0 , 1, 0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I tried your formula but I am getting the following error.. Am I doing something wrong?&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>Fri, 10 Sep 2021 04:24:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068087#M46757</guid>
      <dc:creator>GA1993</dc:creator>
      <dc:date>2021-09-10T04:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Difference of values between current and previous month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068112#M46759</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307062" data-lia-user-login="GA1993" class="lia-mention lia-mention-user"&gt;GA1993&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Close Sum formula with bracket ")".&lt;/P&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Measure =&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Var _TM= Max([Start Date])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Var _LM = date(year(_TM),month(_TM)-1,day(_TM))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Var _This MonthV = Calculate(sum([Phising Website]&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,[Start Date]=TM)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Var _PrevMonthV =&amp;nbsp;Calculate(sum([Phising Website]&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,[Start Date]=LM)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(_This MonthV-_PrevMonthV&amp;lt;=0,1,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, please consider&amp;nbsp;&lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Appreciate your Kudos&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":victory_hand:"&gt;✌️&lt;/span&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;STRONG&gt;!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 04:58:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068112#M46759</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-09-10T04:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Difference of values between current and previous month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068124#M46760</link>
      <description>&lt;P&gt;Thank you! It worked for this. However, when I reused the code for the other fields because it has the same formula, the error below kept popping up...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any workaround for this?&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>Fri, 10 Sep 2021 05:08:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068124#M46760</guid>
      <dc:creator>GA1993</dc:creator>
      <dc:date>2021-09-10T05:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Difference of values between current and previous month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068224#M46762</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307062" data-lia-user-login="GA1993" class="lia-mention lia-mention-user"&gt;GA1993&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please see below links:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/" target="_blank"&gt;https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.sqlbi.com/articles/understanding-circular-dependencies/" target="_blank"&gt;https://www.sqlbi.com/articles/understanding-circular-dependencies/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/quot-A-circular-Dependency-was-detected-quot-error-while/td-p/170560" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/quot-A-circular-Dependency-was-detected-quot-error-while/td-p/170560&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, please consider&amp;nbsp;&lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Appreciate your Kudos&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":victory_hand:"&gt;✌️&lt;/span&gt;&lt;/STRONG&gt;!!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 06:25:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-of-values-between-current-and-previous-month/m-p/2068224#M46762</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-09-10T06:25:53Z</dc:date>
    </item>
  </channel>
</rss>

