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
Anonymous
Not applicable

Calculating Remaining Day

I have a expire date column so I wan't to calculate remaining years,months,days left based on current date.

Phaniii_1-1652258170546.png

I'm getting only days when I used DATEDIFF function. 

Phaniii_2-1652258388573.png

But I wan't to show year,month,day also in same column

Phaniii_3-1652258588563.png

How to achive this

 

 

 

1 ACCEPTED SOLUTION

Hello @Anonymous ,

 

Not sure what you are doing wrong.

I hope you have already created Calculated column as you mentioned above as-

 

Remaning Days = Datediff(Today(),'sheet1'[warranty expires],DAY)

 

Please try creating below one more calculated column-

Converted = QUOTIENT('Sheet1'[Remaining Days], 365) & " years " &  QUOTIENT(MOD('Sheet1'[Remaining Days],365),30) & " months " & MOD(MOD('Sheet1'[Remaining Days],365),30) & " days"

 

Please mark it as answer if it resolves your issue. Kudos are also appreciated.

 

Cheers,
Shishir

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I'm getting results like this.

Phaniii_0-1652260285788.png

I wan't to show remaining days left based on todays date.

Hello @Anonymous ,

 

Not sure what you are doing wrong.

I hope you have already created Calculated column as you mentioned above as-

 

Remaning Days = Datediff(Today(),'sheet1'[warranty expires],DAY)

 

Please try creating below one more calculated column-

Converted = QUOTIENT('Sheet1'[Remaining Days], 365) & " years " &  QUOTIENT(MOD('Sheet1'[Remaining Days],365),30) & " months " & MOD(MOD('Sheet1'[Remaining Days],365),30) & " days"

 

Please mark it as answer if it resolves your issue. Kudos are also appreciated.

 

Cheers,
Shishir
Shishir22
Solution Sage
Solution Sage

Hello @Anonymous ,

 

Please use below DAX on top of your calculation for Remaining Days-

 

Converted = QUOTIENT('Table'[Remaining Days], 365) & " years " &  QUOTIENT(MOD('Table'[Remaining Days],365),30) & " months " & MOD(MOD('Table'[Remaining Days],365),30) & " days"

 

Please mark it as answer if it solves your issue. Kudos are also appreciated.

 

Cheers,
Shishir

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