<?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: SUMX over all dates within a month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769266#M3612</link>
    <description>&lt;P&gt;Dear Power BI team, give this man&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;a statue for his contribution to this forum!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;why is the daily number of reactivated users different from my first measure with a monthly total of 2226?&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="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; thanks for your reply and interesting posts!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 17:57:48 GMT</pubDate>
    <dc:creator>avanderschilden</dc:creator>
    <dc:date>2019-08-18T17:57:48Z</dc:date>
    <item>
      <title>SUMX over all dates within a month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769185#M3588</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following model;&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;&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;&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;I have a measure that calculates the number of reactivated users for each calendar date;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Reactivated Users = 
VAR _MaxDate =
    MAX ( 'D Calendar'[Date] )
VAR _CurrentUsers =
    CALCULATETABLE ( VALUES ( 'F Orders'[UserId] ), 'D Order'[IsCompleted] = "Yes" )
VAR _UserBefore60Days =
    CALCULATETABLE (
        VALUES ( 'F Orders'[UserId] ),
        'D Calendar'[Date] &amp;lt; _MaxDate - 60,
        'D Order'[IsCompleted] = "Yes"
    )
VAR _UsersLast60Days =
    CALCULATETABLE (
        VALUES ( 'F Orders'[UserId] ),
        'D Calendar'[Date] &amp;gt;= _MaxDate - 60
            &amp;amp;&amp;amp; 'D Calendar'[Date] &amp;lt;= _MaxDate - 1,
        'D Order'[IsCompleted] = "Yes"
    )
VAR _Result =
    CALCULATE (
        DISTINCTCOUNT ( 'F Orders'[UserId] ),
        FILTER (
            ALL ( 'F Orders'[UserId] ),
            'F Orders'[UserId] IN _CurrentUsers
                &amp;amp;&amp;amp; 'F Orders'[UserId] IN _UserBefore60Days
                &amp;amp;&amp;amp; NOT 'F Orders'[UserId] IN _UsersLast60Days
        )
    )
RETURN
    _Result&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to display the total sum of all dates as the total for the month;&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;&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;&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;&lt;P&gt;Does anyone have an idea how to achieve the desired result?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:03:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769185#M3588</guid>
      <dc:creator>avanderschilden</dc:creator>
      <dc:date>2019-08-18T10:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX over all dates within a month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769201#M3593</link>
      <description>&lt;P&gt;This looks like a measure totals problem. Very common. See my post about it here: &lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 11:41:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769201#M3593</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2019-08-18T11:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX over all dates within a month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769217#M3598</link>
      <description>&lt;PRE&gt;[Reactivated Users - Helper Measure] = -- hidden measure
// This measure works correctly on an individual
// day level.
VAR _MaxDate = MAX ( 'D Calendar'[Date] )
VAR _CurrentUsers =
    CALCULATETABLE (
    	VALUES ( 'F Orders'[UserId] ), 
    	'D Order'[IsCompleted] = "Yes" 
    )
VAR _UsersBefore60Days =
    CALCULATETABLE (
        VALUES ( 'F Orders'[UserId] ),
        'D Calendar'[Date] &amp;lt; _MaxDate - 60,
        'D Order'[IsCompleted] = "Yes"
    )
VAR _UsersLast60Days =
    CALCULATETABLE (
        VALUES ( 'F Orders'[UserId] ),
        'D Calendar'[Date] &amp;gt;= _MaxDate - 60,
        'D Calendar'[Date] &amp;lt;= _MaxDate - 1,
        'D Order'[IsCompleted] = "Yes"
    )
VAR _UsersOfInterest =
	except(
		intersect(
	            _CurrentUsers,
	            _UsersBefore60Days		
		),
		_UsersLast60Days
	)
VAR _Result = countrows ( _UsersOfInterest )
RETURN
    _Result
    
    
[Reactivated Users] =
var __reactivatedUserCount =
	sumx(
		'D Calendar',
		[Reactivated Users - Helper Measure]
	)
return
	__reactivatedUserCount&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Aug 2019 12:58:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769217#M3598</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-18T12:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX over all dates within a month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769266#M3612</link>
      <description>&lt;P&gt;Dear Power BI team, give this man&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;a statue for his contribution to this forum!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;why is the daily number of reactivated users different from my first measure with a monthly total of 2226?&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="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp; thanks for your reply and interesting posts!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 17:57:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769266#M3612</guid>
      <dc:creator>avanderschilden</dc:creator>
      <dc:date>2019-08-18T17:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX over all dates within a month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769567#M3615</link>
      <description>"@darlove why is the daily number of reactivated users different from my first measure with a monthly total of 2226?"&lt;BR /&gt;&lt;BR /&gt;I don't know. Is this wrong? You said you wanted to sum up all the reactivated users for all the days in the month in order to get the total for the month. This is what the measure does. Doesn't it?&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D.</description>
      <pubDate>Mon, 19 Aug 2019 08:30:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769567#M3615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-19T08:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX over all dates within a month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769606#M3618</link>
      <description>&lt;P&gt;The total sum of the daily numbers is correct. It is matching with a manual addition of all days so thanks a lot for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My doubts are based on the fact that your measure is producing a different daily result than my old measure, and I'm not sure which change you made in the new measure is creating this difference. Anyway, thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 09:00:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769606#M3618</guid>
      <dc:creator>avanderschilden</dc:creator>
      <dc:date>2019-08-19T09:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: SUMX over all dates within a month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769615#M3619</link>
      <description>To know which is right you have to manually and carefully calculate the measure for some of the days. Take those days where there is a difference between the measures.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D.</description>
      <pubDate>Mon, 19 Aug 2019 09:05:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUMX-over-all-dates-within-a-month/m-p/769615#M3619</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-19T09:05:13Z</dc:date>
    </item>
  </channel>
</rss>

