Forum Discussion
Moving Average
- Anonymous6 years ago
Hi lt79_Pax
You may refer to the blog from this link: https://www.sqlbi.com/articles/row-context-and-filter-context-in-dax/
It may help you to have a deeper understanding in filter context and row context.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi lt79_Pax ,
Article on Moving Averages
https://tradebrains.in/moving-averages-indicator/
Now, a simple moving average (SMA) is a calculation that considers the average or arithmetic mean of a given set of prices over a specific time period.
Suppose the 30 Day Moving Average for 31st Dec , 2011 is "X" which takes the price from 12/1/2011 to 12/31/2011.
Now the next day i.e 1st of january 2012, the 30 day moving average will be proce from 12/2/2011 to 1/1/2012.
and this is what the formula is doing - > 'Date'[Date] > LastVisibleDate - NumberofDays && 'Date'[Date] <= LastVisibleDate
Hope i was able to explain.
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)