cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

How to define the measure which uses the evaluation context value

MyMeasure = TotalLeaversYTD / NoOfPeople * (12 / n)

 

where

 

n is the month for which the measure is being calculated

 

Rest of the things I am able to create a measure however not able to figure out how to create a measure for n which can be called up for MyMeasure

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: How to define the measure which uses the evaluation context value

Hi,

 

Try this

 

=IF(MONTH(MIN(Data[MonthName]))-3<0,12+(MONTH(MIN(Data[MonthName]))-3),MONTH(MIN(Data[MonthName]))-3)

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Highlighted
Solution Sage
Solution Sage

Re: How to define the measure which uses the evaluation context value

Your post is not clear. Do you want the current month to be considered as n?

Highlighted
Helper II
Helper II

Re: How to define the measure which uses the evaluation context value

Capture3.JPG

My PowerBI table looks like this...I am unable to create a measure YTDAttrition which gets evaluated in context of the selected month. Please refer to the above screenshot formula next to YTDAttrition

Highlighted
Helper II
Helper II

Re: How to define the measure which uses the evaluation context value

I want the filtered month no to be considered as n

for e.g. while calculating YTD % as in May, value of n should be 5-3 = 2 (2nd from Apr)

(Financial year considered as Apr to Mar)

Highlighted
Super User IV
Super User IV

Re: How to define the measure which uses the evaluation context value

Hi,

 

Try this

 

=IF(MONTH(MIN(Data[MonthName]))-3<0,12+(MONTH(MIN(Data[MonthName]))-3),MONTH(MIN(Data[MonthName]))-3)

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors