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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Colinu
Helper I
Helper I

Day Count from Last date in Record

Hi All

 

I am new to BI and would like some help please. 

 

My data has a date colum that shows the last visit to a location. I have used the new mesure (Lastdate) to find the record with the most recent visit and this displys in a table fine. What i need to do is show how many days have lapsed since this last visit.

 

Table looks like this:

 

Locations           Date of Visit

Office                  12-01-18

 

 

New Mesure is:

Date of Last Visit = Lastdate (Visits[Dateoflastvisit])

 

I need to return the value in Days as a number.

 

Hope you can help, thanks

 

 

2 ACCEPTED SOLUTIONS
p0nk
Frequent Visitor

Try this measure:

 

Date difference = DATEDIFF(LASTDATE(Table Name[Date of Visit]), TODAY(), DAY)

View solution in original post

@Colinu,

If your issue is solved, please accept appropriate replies as answer to close this thread.

Regards,
Lydia

Community Support Team _ Lydia Zhang
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
p0nk
Frequent Visitor

Try this measure:

 

Date difference = DATEDIFF(LASTDATE(Table Name[Date of Visit]), TODAY(), DAY)

That's what i needed thanks

@Colinu,

If your issue is solved, please accept appropriate replies as answer to close this thread.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.