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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Trailing 4 Week calculation help

Hey everyone, 

 

I'm stuck on a calucation I need some help with. 

I have the following date table 

Robinhood_0-1615582608603.png

 and I have average customer satisfaction score by date in another table 

 

I'm trying to look at trailing week, 

Trailing week ending = 'Date'[Date]+(0-'Date'[weekdaynumber])
which seems to be working  corrently
 
and trailing 4 week 
so last weeks numbers + 3 weeks before that
 
I tried the following but it's not working
Trailing 4 week csat =
calculate([Csat %],
DATESINPERIOD ('Date'[Trailing week ending].[Date],LASTDATE ( 'Date'[Trailing week ending].[Date]),-28,DAY))
 
this doesn't seem to give the correct amount however. 
 
anyone have
 
2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

Can you please share some dummy data with a similar data structure and expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

DataInsights
Super User
Super User

@Anonymous,

 

The post below may be helpful:

 

https://community.powerbi.com/t5/Desktop/Date-Grouping-based-on-MOST-RECENT-dates/m-p/1461638#M610942 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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