Forum Discussion
DAX code help: 4 Quarter Rolling
I have a sample data with Survey waves (from 10 different time periods 1 to 10).
Need help in creating a measure which gives rolling 4 quarter average (this is not simple average of scores).
In the attached file we have measure which gives the score by survey waves:
What I want is to create a measure which gives 4 quarter rolling data (this is not simple average of 4 quarter as the data is weighted giving each wave some factor: refer column Weights) as below highligted:
Desired result is as below, Need to create a measure which gives:
It is important to note that the code should be dynamic as the Survey Wave column over time will get more values (11, 12 .... etc going forward in time).
2 Replies
- gregoliveiraHelper II
Hi.
This article from SQLBI team explain how to deal with many time calculations (https://www.daxpatterns.com/standard-time-related-calculations/).
Hope this help you.
- pk1593Helper I
Thank you for sharing this, however I'm not able to solve the above specific query.