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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Rolling Average Measure Improper Calculation

I have a Rolling 7 day average metric that works well for the most part. However, for some reason, for some entities when I drill down to see the R7, the measure jumps off the page with a very high incorrect calculation:

 

Rolling 7 Day Average Volume = 
CALCULATE (
    [Total Volume],
 
    DATESINPERIOD (
       'Date'[Date],
        LASTDATE ('Date'[Date] ),
        -7,
        DAY
    )
)
    / CALCULATE (
        DISTINCTCOUNT ('Date'[Date] ) ,
        DATESINPERIOD (
           'Date'[Date],
            LASTDATE ('Date'[Date] ) ,
            -7,
            DAY
        ),NOT(ISBLANK(Volume[Volume])
    ) )

 

bowtiedbi_0-1655750582537.png

When I export the data, I have blank volume for that day.

DateConcat DateTotal VolumeRolling 7 Day Average Volume
6/20/2022 0:00Monday 06/20 3795203

 

 

Anyone know what I'm missing here?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I have created a data sample to try to reproduce your case.

Eyelyn9_0-1655963836752.png

Eyelyn9_2-1655963870942.png

You may try my method to calculate the sum volume of the rolling 7 days:

Measure = 
CALCULATE(SUM(Volume[Volume]), FILTER('Volume',[Date]>=MAX('Date'[Date])-7 && [Date]<=MAX('Date'[Date])))

See the differences:

Eyelyn9_3-1655963929057.png

So Could you please provide me with more details about your table and your problem to help us clarify your scenario? Or share your pbix file after removing sensitive data 

 

 

Best Regards,
Eyelyn Qin
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

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

I have created a data sample to try to reproduce your case.

Eyelyn9_0-1655963836752.png

Eyelyn9_2-1655963870942.png

You may try my method to calculate the sum volume of the rolling 7 days:

Measure = 
CALCULATE(SUM(Volume[Volume]), FILTER('Volume',[Date]>=MAX('Date'[Date])-7 && [Date]<=MAX('Date'[Date])))

See the differences:

Eyelyn9_3-1655963929057.png

So Could you please provide me with more details about your table and your problem to help us clarify your scenario? Or share your pbix file after removing sensitive data 

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors