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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Value between 2 dates

I need to calculate a measure which will always give me the most up todate value (the max date) for the NAV divided by the NAV on the a number of date ranges eg the last month, the last 3 months, the last year. I am trying to calculate the % between any of these two periods. The data is set out below. Thanks in advance. 

 

TimeIntell.JPG

2 ACCEPTED SOLUTIONS
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

Here is one approach to consider as a calculated measure.  Just replace where I have Table 3 with your own table and set the format to Percent.

 

 

Measure 2 = 
VAR MonthsToLookBack = 3
VAR maxDate = MAX('Table 3'[Date])
VAR otherDate = CALCULATE(MAX('Table 3'[Date]),FILTER('Table 3','Table 3'[Date] < DATEADD('Table 3'[Date],MonthsToLookBack,MONTH)))

VAR LatestNAV = CALCULATE(MAX('Table 3'[Nav]),FILTER('Table 3',[Date]=maxDate))
VAR otherNAV = CALCULATE(MAX('Table 3'[Nav]),FILTER('Table 3',[Date]=otherDate))
RETURN DIVIDE (LatestNAV - otherNAV,LatestNAV)

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

Ashish_Mathur
Super User
Super User

Hi @Anonymous,

 

Download the file from here.

 

Untitled.png

 

 


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

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi @Anonymous,

 

Download the file from here.

 

Untitled.png

 

 


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

Ashish, Thanks so much for you help. I'm getting there but keep hitting dax roadblocks;your input is invaluable and much appreciated. Thanks. 

You are most welcome.


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

Hi Ashish, I am struggling a bit to implement your solution which works for periods like 1 month, 3 months or 12 months but how could I factor in Year to date and since inception calculations using your model. 

Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

Here is one approach to consider as a calculated measure.  Just replace where I have Table 3 with your own table and set the format to Percent.

 

 

Measure 2 = 
VAR MonthsToLookBack = 3
VAR maxDate = MAX('Table 3'[Date])
VAR otherDate = CALCULATE(MAX('Table 3'[Date]),FILTER('Table 3','Table 3'[Date] < DATEADD('Table 3'[Date],MonthsToLookBack,MONTH)))

VAR LatestNAV = CALCULATE(MAX('Table 3'[Nav]),FILTER('Table 3',[Date]=maxDate))
VAR otherNAV = CALCULATE(MAX('Table 3'[Nav]),FILTER('Table 3',[Date]=otherDate))
RETURN DIVIDE (LatestNAV - otherNAV,LatestNAV)

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Hi Phil, 

 

Any chance you can show how I would adjust to fact in year to date and since inception dates. 

Anonymous
Not applicable

Finally figured it out! Thanks. 

Anonymous
Not applicable

Hi Phil, I copied this over to my model and the measure isn't producing any results. If I have to include Year to date and since inception could you explain what alternations I need to make to your measure 

 

datemeasure.JPG

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors