Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

"Rolling 12" measure fails on last value only

$
0
0
Rolling12UpTime = CALCULATE(
	sum('Date'[UptimeMin]),
	(DATESINPERIOD('Date'[Date], LASTDATE('Date'[Date]), -1, YEAR))
)

Date[UptimeMin] is a simple calculated column:

 

UptimeMin = calculate(24*60)

 

The Date table only has dates from 2015 through the current date, as I am using this to show YTD and rolling 12 up through "today".  All of the YTD measures work correctly (using TOTALYTD), but the measure Rolling12UpTime above (using the DAX pattern for "moving annual totals") seems to be doing some subtracting on the last date:

 

rolling12.PNG

 

 

 

 

 

 

 

 

 

 

 

 

The amount that is missing is curiously exactly 18*1440, which is exactly the number of minutes in remainder of the month after today (1/13/17).

 

What could be happening here? I just wrote the measure today in the January 2017 update of PowerBI Desktop, in case anyone can produce the correct calculation on an earlier version of desktop.  The Date table could consist of just Date and UptimeMin.

 

Thanks,

David Edelman

 

EDITED TO ADD: I bumped up the Date table to have all values through tomorrow (1/14/17).  This fixed the value for 1/13 but the value for 1/14 is now incorrect by 17*1440.


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>