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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

YTD and MTD to selected filter date

Hello,

 

I have a report with a year, month and day filter (see picture below) and want to calculate the Net Promoter Score (NPS) for Year to Date (YTD) and Month to Date (MTD) up to the selcted day only.

 

For example, If I have chosen 2017, June, 27 I want the YTD to calculate from 1 Jan-27 Jun 2017, and MTD from 1-27 jun 2017.

 

My NPS formula is as follows, which at the moment calculates the NPS for the specific dates selected in the filters.

 

NPS = ((CALCULATE(COUNT('GSS'[AC04]),'GSS'[AC04]>8)-CALCULATE(COUNT('GSS'[AC04]),'GSS'[AC04]<7))/CALCULATE(COUNT('GSS'[AC04]),'GSS'[AC04]>=0)*100)

 

Any help much appreciated.

 

Many thanks,

 

George

 

Capture.JPG

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @Anonymous,

 

According to your description above, the formulas below should work in your scenario. Smiley Happy

NPS YTD = TOTALYTD ( [NPS], 'Date'[Date] )
NPS MTD = TOTALMTD ( [NPS], 'Date'[Date] )

Note: just replace 'Date'[Date] with the date column name in your Calendar table.

 

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @Anonymous,

 

According to your description above, the formulas below should work in your scenario. Smiley Happy

NPS YTD = TOTALYTD ( [NPS], 'Date'[Date] )
NPS MTD = TOTALMTD ( [NPS], 'Date'[Date] )

Note: just replace 'Date'[Date] with the date column name in your Calendar table.

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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