Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pk1593
Helper I
Helper I

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:

pk1593_0-1689492468794.png

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:

pk1593_2-1689492622998.png

 

Desired result is as below, Need to create a measure which gives:

pk1593_3-1689492714440.png

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.

2 REPLIES 2
gregoliveira
Helper II
Helper 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.

Thank you for sharing this, however I'm not able to solve the above specific query.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors