Forum Discussion
pstanek
10 years agoPost Patron
Time Intelligence Functions (DAX)
Can I use Time Intelligence Functions (DAX) in Power BI?
pstanek
10 years agoPost Patron
Can you give me a hint ?
pcena_bd_last30days2 = CALCULATE(SUM(movement[pcena]); movement[datum]>NOW()-30; movement[datum] <= NOW())
I tried to rewrite this with function datesbetween, but It did not work.
v-caliao-msft
10 years agoMicrosoft Employee
Hi Pstanek,
According to your description, you need a moving sum for latest 30 days, right?
If that is the case, here is a blog which describes hwo to do it step by step, please refer to the link below to see the details.
[3 Month Moving Sum Units Sold] =
CALCULATE([Units Sold],
DATESINPERIOD(Calendar[Date],
LASTDATE(Calendar[Date]),-3, Month
)
)
http://www.powerpivotpro.com/2013/07/moving-averages-sums-etc/
Regards,
Charlie Liao