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
ProdPal
New Member

Need help with Dax calculation : For 4 Quarter Rolling%

Here's my Sample data ,

Index Year Quarter Response Date NPS Group

12025 Q12025-01-15Promoter
22025 Q12025-01-15Passive
32025 Q12025-01-15Detractor
42025 Q12025-01-22Promoter
52025 Q12025-01-22Passive
62025 Q12025-01-22Detractor
72025 Q12025-01-29Promoter
82025 Q12025-01-29Passive
92025 Q12025-01-29Detractor
102025 Q22025-04-05Promoter
112025 Q22025-04-05Passive
122025 Q22025-04-05Detractor
132025 Q22025-04-12Promoter
142025 Q22025-04-12Passive
152025 Q22025-04-12Detractor
162025 Q22025-04-19Promoter
172025 Q22025-04-19Passive
182025 Q22025-04-19Detractor
192025 Q32025-07-10Promoter
202025 Q32025-07-10Passive
212025 Q32025-07-10Detractor
222025 Q32025-07-17Promoter
232025 Q32025-07-17Passive
242025 Q32025-07-17Detractor
252025 Q32025-07-24Promoter
262025 Q32025-07-24Passive
272025 Q32025-07-24Detractor
282025 Q42025-10-05Promoter
292025 Q42025-10-05Passive
302025 Q42025-10-05Detractor

 

In need to calculate % of Promoters , Passive , Detractors in Power BI , 
The formula for Promoter % is (Count of Promoters / Total Count )*100 
My requirement is if I click on 2024 Q3, My Rolling $ Quarter _ Promoter % =  ( Count of Promoters  for Q3 2024 +Q2 2024+Q1 2024+Q4 2023)/(Total Count for  Q3 2024 +Q2 2024+Q1 2024+Q4 2023)*100

In the above sample data i have pasted if I click Q4 2024 in my slicer , I should get Rolling Promoter % ( Q4 2024+Q3 2024+Q2 2024+ Q1 2024)
My output should be in the below format :

Year Quarter Promoter % Passive % Detractor %

2025 Q'1   
2025 Q'2   
2025 Q'3   
2025 Q'4 
3 ACCEPTED SOLUTIONS
Rupak_bi
Super User
Super User

Hi @ProdPal ,

Based on the sample data Below is the result. 

Rupak_bi_0-1750154554340.png

And the measure is:

Rolling $ Quarter _ Promoter % = 
var stat = max('Table'[ Response Date])-365
var B = date(year(stat),month(stat),1)
RETURN
calculate(COUNT('Table'[NPS Group]),ALLEXCEPT('Table','Table'[NPS Group]),'Table'[ Response Date]>=B,'Table'[ Response Date]<=max('Table'[ Response Date]))

TO get the percentage, go to the value pane, put show value as percentage of row total.

 

Let me know If this works. Plz accept as solution if works.



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

View solution in original post

v-venuppu
Community Support
Community Support

Hi @ProdPal ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @Rupak_bi for the prompt response.

I have created PBIX file using sample data, please go through the attached PBIX file.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly.

Thank you.

 

View solution in original post

v-venuppu
Community Support
Community Support

Hi @ProdPal ,

I wanted to check if you had the opportunity to review the information provided.If the response has addressed your query, please accept it as a solution, so other members can easily find it.

Thank you.

View solution in original post

4 REPLIES 4
v-venuppu
Community Support
Community Support

Hi @ProdPal ,

I wanted to check if you had the opportunity to review the information provided.If the response has addressed your query, please accept it as a solution, so other members can easily find it.

Thank you.

v-venuppu
Community Support
Community Support

Hi @ProdPal ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @Rupak_bi for the prompt response.

I have created PBIX file using sample data, please go through the attached PBIX file.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly.

Thank you.

 

Thank you so much @Rupak_bi  and @v-venuppu . The suggest code worked perfectly.

Rupak_bi
Super User
Super User

Hi @ProdPal ,

Based on the sample data Below is the result. 

Rupak_bi_0-1750154554340.png

And the measure is:

Rolling $ Quarter _ Promoter % = 
var stat = max('Table'[ Response Date])-365
var B = date(year(stat),month(stat),1)
RETURN
calculate(COUNT('Table'[NPS Group]),ALLEXCEPT('Table','Table'[NPS Group]),'Table'[ Response Date]>=B,'Table'[ Response Date]<=max('Table'[ Response Date]))

TO get the percentage, go to the value pane, put show value as percentage of row total.

 

Let me know If this works. Plz accept as solution if works.



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

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.