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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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 
2 REPLIES 2
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.

 

Rupak_bi
Impactful Individual
Impactful Individual

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
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.