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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
alexcatala
Helper IV
Helper IV

Days between dates + Today

 

Hi,

 

I am currently working on a formula to obtain the number of days a person has been absent.

 

That's why I have tried to use the basic formula to count the days

 

I have used the basic formula:

 

Absence End Date - Absence Start Date.

 

Unfortunately, it doesn't count the 1st date.

 

So, is there a way to add to the formula a +1 to count the 1st date as well?

 

For example, the 1st line should be 1 absence as it is an absence.

 

 

alexcatala_0-1661256110733.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@alexcatala , Most of the time in case of datediff you have add one

 

int([Absence End Date] - [Absence Start Date]) +1

 

or

datediff( [Absence Start Date], [Absence End Date], day)  +1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@alexcatala , Most of the time in case of datediff you have add one

 

int([Absence End Date] - [Absence Start Date]) +1

 

or

datediff( [Absence Start Date], [Absence End Date], day)  +1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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