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! Request now

Reply
Anonymous
Not applicable

Formula for calculating rolling 365

Hi,

 

I have a measure, NPS = ([% of Promoters]*100) - ([% of Detractors]*100) that I am trying to create a rolling 365 day calculation for (NOT A SUM). Basically, for every day I would need to calculate this NPS measurement for the past 365 days. 

 

I'm sure this is really easy but for some reason I can't get it. 

 

Any help would be appreciated. 

 

Thanks

 

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

 

Can you share a dummy sample in Text model that we can copy or download?

If the rolling isn't a SUM, what should it be?

It could be like below. 

 

Measure =
CALCULATE (
    SUMX ( 'table', [NPS] ),
    DATESINPERIOD ( 'calendar'[date], MIN ( 'calendar'[date] ), -1, YEAR )
)

 

 

Best Regards,

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

Hi,

 

So I have these scores over several years from customers. On my line graph/visual, for each day I want to see the NPS calculation for the past 365 days. Ex: If I had a line graph, on January 1, 2018 I would want to see the NPS for the past 365 days. The scores would be from the past 365 days rather than just January 1, 2018 scores.

 

CustomerScoreDateScore (Group) 
adam310/1/2017Detractor (0-6) 
bob81/1/2018Neutral (7-8) 
dylan52/5/2018Detractor (0-6) 
ed76/8/2018Neutral (7-8) 
frank99/9/2018Promoter (9-10) 
     
Net Promoter Score NPS = ( % promoters - % detractors ) x 100
     

Hi @Anonymous ,

 

What should the result be from your sample here? If you'd like to calculate the values in a period, maybe you can try datesinperiod-function-dax.

 

 

Best Regards,

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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