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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Last N Months Measures

Hello!

 

I have a Measure called NPS Score. This score is calculate liked this:

NPS Score =
var PromoterDetractor =
CALCULATE(Detail[Total Surveys],FILTER(Detail,Detail[Recommend Rating] = "Promoter")) - CALCULATE(Detail[Total Surveys],FILTER(Detail,Detail[Recommend Rating] = "Detractor"))

var Percentage =
divide(100,Detail[Total Surveys])

RETURN
PromoterDetractor * Percentage

 

I would like to have a table chart that looks like this:

mkopp12990_0-1654281926805.png

 

I am struggling figuring out how to do this. I would like the NPS score as of what whatever the N filter would indicate. How do you create a Measure for that? Thank you!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You can use a what if parameter

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

 

you will get what measure

What if meausre  = selectedvalue(param[param])

 

example , the new measure

Rolling N = CALCULATE([NPS Score],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-1 * [What if meausre],MONTH))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You can use a what if parameter

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

 

you will get what measure

What if meausre  = selectedvalue(param[param])

 

example , the new measure

Rolling N = CALCULATE([NPS Score],DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-1 * [What if meausre],MONTH))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.