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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Clausbert
Regular Visitor

Calculating Average for a different time span changing dynamically

Hi guys,

 I searched the internet but couldn't find an answer to this question. I hope it's easier than I think as I am fairly new to PBI.

My target is to have a 3 week-, 6 week- and 13 week average of my data. However the twist is, that the time span I am looking at is changing.

Clausbert_0-1669365217078.png

When I have the current week I get the correct result, as I am calculating the time span with the Today function minus the 13 weeks.

My problem starts, when I use the week slider:

Clausbert_1-1669365292584.png

You see, that I don't have any calculation for w-3 and 2-6 and on top don't have a w-13 calculation for w-13 but only for the remaining weeks that get shown as the count still starts at week 47.

 

Long story short. Any super brain here to help me out?

 

Thanks a lot!

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

The right end of your slicer marks the maximum of your filter context.  So instead of using "today" as the right basis, use MAX(Wochenslicer) and then do the shifts as needed from that point.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

The right end of your slicer marks the maximum of your filter context.  So instead of using "today" as the right basis, use MAX(Wochenslicer) and then do the shifts as needed from that point.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.