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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ahmed-97
New Member

Trying to calculate days remaining

As mentioned in the subject, I'm having trouble creating a measure for my days remaining for using the todate from my data.

I have made sure that the column is formatted as date. However I still can not link the column in any measure. I have tried using datediff, max, min but nothing worked.

I am able to create a column using the formula, but would that be ideal? 

ahmed97_1-1722499351631.png

 

ahmed97_0-1722496319619.png

 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @ahmed-97 - Can you try with the below measure to get the days remainings

 

Days Remaining =
IF (
MAX('YourTable'[ToDate]) >= TODAY(),
DATEDIFF(TODAY(), MAX('YourTable'[ToDate]), DAY),
BLANK()
)

 

Hope it helps 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @ahmed-97 - Can you try with the below measure to get the days remainings

 

Days Remaining =
IF (
MAX('YourTable'[ToDate]) >= TODAY(),
DATEDIFF(TODAY(), MAX('YourTable'[ToDate]), DAY),
BLANK()
)

 

Hope it helps 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





This actually worked, Thank you so much!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors