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
aguffin
Frequent Visitor

Rolling 4 Quarter Average Quarter Over Quarter

I've got three relevant columns of data, a date column and two integer columns. I need to calculate for every quarter a rolling 4 quarter average that's equal to the sum of one column of integers over the sum of the other.

To give a better example, please see the image here.

 

Number of Tests and Wrong Answers by Date.JPG

1 ACCEPTED SOLUTION

Hi @aguffin,

Could you mean you have the Quarter group? If so, you could refer to below steps:

Sample data:

1.PNG

Create below measure:

Measure = CALCULATE(SUM(Table1[Wrong Answers]),FILTER('Table1','Table1'[Quarter]=MAX('Table1'[Quarter])))/CALCULATE(SUM(Table1[Tests Taken]),FILTER('Table1','Table1'[Quarter]=MAX('Table1'[Quarter])))

Result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-danhe-msft
Employee
Employee

Hi @aguffin,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered to close this topic?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-danhe-msft
Employee
Employee

Hi @aguffin,

From your sample data in your posted picture, I wonder why the date you want to average is not in a quarter?

For example, the data in below picture belongs to 2015 Q1:

1.PNG

Could you please offer me more information about it?

 

Regars,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Not sure what you mean, but I can introduce a step to group the data into quarters. Is that what you're talking about?

Hi @aguffin,

Could you mean you have the Quarter group? If so, you could refer to below steps:

Sample data:

1.PNG

Create below measure:

Measure = CALCULATE(SUM(Table1[Wrong Answers]),FILTER('Table1','Table1'[Quarter]=MAX('Table1'[Quarter])))/CALCULATE(SUM(Table1[Tests Taken]),FILTER('Table1','Table1'[Quarter]=MAX('Table1'[Quarter])))

Result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.