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

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Top Solution Authors