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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
alearner
Helper I
Helper I

Find the NAV which is past 1 year from the latest NAV date

Need some suggestion. I have 2 tables:

1. Date Table which has all the dates

2. NAV table which has NAV for a Scheme for the past 1o years. The columns are as below:

     NAV_Date Scheme_Name NAV_Value

 

My requirement is that I would like to know what was the NAV 1 year from the lastest NAV in the NAV Table. 

 

The challange that I am facing is that if I substract 1 year to the lastest NAV that might be a Saturday or Sunday or a Holiday and I will not have a NAV_Value for that date.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @alearner ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1701156976091.png

(2) We can create a calculated column.

Column = 
var _b=DATE(YEAR('NAV table'[navDate])-1,MONTH('NAV table'[navDate]),DAY('NAV table'[navDate]))
var _c=MinX(FILTER('NAV table',[navDate]>=_b),[navDate])
RETURN IF(not YEAR('NAV table'[navDate])-1 in VALUES('Date Table'[Date].[Year]),BLANK(),CALCULATE(SUM('NAV table'[navValue]),FILTER('NAV table','NAV table'[navDate]=_c)))

(3) Then the result is as follows.

vtangjiemsft_1-1701157383699.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @alearner ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1701156976091.png

(2) We can create a calculated column.

Column = 
var _b=DATE(YEAR('NAV table'[navDate])-1,MONTH('NAV table'[navDate]),DAY('NAV table'[navDate]))
var _c=MinX(FILTER('NAV table',[navDate]>=_b),[navDate])
RETURN IF(not YEAR('NAV table'[navDate])-1 in VALUES('Date Table'[Date].[Year]),BLANK(),CALCULATE(SUM('NAV table'[navValue]),FILTER('NAV table','NAV table'[navDate]=_c)))

(3) Then the result is as follows.

vtangjiemsft_1-1701157383699.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

alearner
Helper I
Helper I

Please refer below for the sample file:

 

pastebin.com/embed_js/0EcLuH32?theme=dark 

 

The last row in the sample data is 

 

  1. 20-10-2023 250.429 250.429 HDFC Mutual Fund HDFC Large and Mid Cap Fund - Direct Plan - Growth

So the latest NAV date is 20-10-2023 for HDFC Large and Mid Cap Fund - Direct Plan - Growth scheme. I would like to know the NAV value for 20-10-2022. Since 20-10-2022 was a weekday I have a value but had it been a weekend I would not have a value so intead would lile to have the value for Monday or the next day which has a value. 

Fowmy
Super User
Super User

@alearner 

It will be helpful if you could provide some sample data and explain the expected results.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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