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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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