cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
karlosdsouza Regular Visitor
Regular Visitor

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
Super User
Super User

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.

4 REPLIES 4
sreenathv Member
Member

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?

karlosdsouza Regular Visitor
Regular Visitor

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
karlosdsouza Regular Visitor
Regular Visitor

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)

Super User
Super User

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.

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 43 members 1,339 guests
Please welcome our newest community members: