Forum Discussion

MLYNCH's avatar
MLYNCH
Frequent Visitor
2 years ago

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.

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

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.

Thanks,

Michelle Lynch

4 Replies

  • manvishah17's avatar
    manvishah17
    Solution Supplier

    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.

  • MLYNCH's avatar
    MLYNCH
    Frequent Visitor

    Hi

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

    Any idea where I've gone wrong?

    Michelle.

  • manvishah17's avatar
    manvishah17
    Solution Supplier

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

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    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?