Forum Discussion

pk1593's avatar
pk1593
Helper I
3 years ago

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).

Please download the .pbix file here for more clarity.