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
MLYNCH
Frequent Visitor

Latest Date Formula

Hi

I have a list in MS Project Online which contains a date field that is updated each time a new item is created on the list. In Power BI desktop I want to show the difference between today and the latest date input on the list in Project Online.

I created the date diff formula, however it shows the 1st date that was entered on the log so any new dates show on the table in Power BI but the calculation is incorrect.

So for example, below project 2368_SBA Website Redevelopment and Move to IXIS has a reported stage finish of 16/05/24 but the calculation is showing the previous date from the list  which was 01/02/24.

MLYNCH_0-1714650316450.png

I have a filter on Latest Reported Stage to show the last update from the list in Project Online

MLYNCH_1-1714650402151.png

Is there a way of creating a field that shows the latest date from the list in Project Online, then I can use that field in my formula rather than the date field that is on the table now (renamed from Reported Stage Finis Latest to Reported Stage Finish) for the report table.

MLYNCH_2-1714651205011.png

Thanks,

Michelle Lynch

4 REPLIES 4
v-zhouwen-msft
Community Support
Community Support

Hi @manvishah17 ,thanks for the quick reply.

Hi @MLYNCH ,

Regarding your question, I was wondering if 'Report Stage' has any effect on filtering the latest date? Can you share some simple data?

manvishah17
Resolver I
Resolver I

Can you please explain more about the requirement or error or give me some sample data.

 

MLYNCH
Frequent Visitor

Hi

Thanks for the reply, I used your formula but the answer is incorrect.

MLYNCH_0-1714657580706.png

Any idea where I've gone wrong?

Michelle.

manvishah17
Resolver I
Resolver I

HI @MLYNCH , 
I am not able to understand your problem but can help you.

 

DaysDifference = 
VAR LatestDate = MAX('YourTable'[YourDateColumn])
RETURN
DATEDIFF(LatestDate, TODAY(), DAY)

 

Enter the table name and column name according to your data. 
If this post helps , please accept it as a solution.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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