Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a expire date column so I wan't to calculate remaining years,months,days left based on current date.
I'm getting only days when I used DATEDIFF function.
But I wan't to show year,month,day also in same column
How to achive this
Solved! Go to 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.
I'm getting results like this.
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.
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!