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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

DAX for Calculating the number of days from Today()

I have a Due Date field.  I want to add a column that displays the result as the number of days remaining to due date.

I'm trying DATEDIFF(Table_Name[Due_Date], TODAY() , DAY)

I've tried a number variations but can't get it operational.  Any ideas?

 

Also, if Due_Date has already past I want the result to show as <negative> 

 

6 REPLIES 6
Jif
Frequent Visitor

Hi Peekay44,

 

I used in  my Date's Table like this :

 

 INT( [Date] ) - INT( Today() )
 
where [Date] is like Table_Name[Due_Date]  
 
I returns a number ( positive or negative ) 
 
Regards,
 
Julio
Anonymous
Not applicable

Did you use "Custom Column" from Add Column tab ?

Jif
Frequent Visitor

Hi Peekay44,

 

I used it on a own Date's table:

 

Jif_1-1700066455739.png

 

aj1973
Community Champion
Community Champion

Hi @Anonymous 

Due_Date field must be in a Date Format, is it?

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

Yes, indeed

aj1973
Community Champion
Community Champion

Can you share a sample please? or a screenshot 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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