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
Anonymous
Not applicable

Quick measure of 12-month rolling average does not work?

Hi,

 

I used Quick Measure to calculate a 12-month rolling average of a monthly percentage. However, the result seems wrong as it's the same of the monthly percentage? I have 2 years of monthly data from Jan-2018. So in theory, for Jan-2019, the rolling average should be the average of 12 months in 2018. But it shows up the same as Jan-2019 percentage?

 

I can't figure out what I have done wrong. I used the default New Quick Measure window and didn't put in any code, only dragged and dropped various column labels into boxes. Please can you share your thoughts and ideas?

 

Thanks,

6 REPLIES 6
Gordonlilj
Solution Sage
Solution Sage

Hi,

 

The most likely solution is what values you put into Period, Periods before and Periods after.

Try something like i've done below and see what values you get

 

Capture.PNG

Anonymous
Not applicable

Thanks. I tried, using -11, or -12, the resulted average is still the same as the actual monthly average. 

Is it possible that you could provide some sample data and your expected result?

Anonymous
Not applicable

Hi, Gordon

 

This is a sample data table:

 

Chargeable%ChargeableTeamTime
85%YTeamA28/01/2018 00:00:00
79%NTeamB28/01/2018 00:00:00
81%NTeamC28/01/2018 00:00:00
90%YTeamB28/02/2018 00:00:00
78%YTeamC28/02/2018 00:00:00
86%YTeamA28/02/2018 00:00:00

 

The data goes from Jan-18 to Apr-19. What I am trying to calculate is the 12-month moving average of the chargeable% for each team. The time column uses only 28th of every month because it's a function generated from the actual Year column and Month column (in format of 1,2,3....12). I am beginning to wonder if it's the problem of this time column so the time function doesn't work. What do you think?

 

Many thanks

 

Hmm,

I'm not able to replicate the issue using the sample data in any way and creating it as you normally would

Capture.PNG

i get the correct rolling average.

So at this point i'm not entirely sure where the issue is coming from.

It might be something with your data that causes it. How are you visualizing the measure?

 

 

 

 

Anonymous
Not applicable

Hi, Gordon

 

Thanks. I am pretty sure that it's some of the month/time column filter that has gone wrong. I tried to stripped the data down to the basic without all the messy stuff built up in my trial-and-error, and then the moving average works perfectly.

 

So nothing is wrong with the quick measure, just too much convoluted mess in the building up of the file. I guess the easiest way is to simply rebuild the file as I now know what I was looking for.

 

Thanks a lot for your patience and your time. Much appreciated.

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.