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! Learn more

Reply
Anonymous
Not applicable

Converting days into months

Hi

 

I am working with a sett of data that tells me at what time a certain product will expire. I have the number of days untill the expiering day, but I wish to represent it as number of months. Also, if it is possible I want Power BI to show me the exact expiering date.

 

In advance, thank you for all your advices!

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

If you have the number of days from today until the expiry you could do something like the following to calculate the expiry date

 

Expiry Date = UTCNow() + DaysTilExpiry

 

Then you can calculate the difference between now and the expiry date in months using the DATEDIFF function

 

Expiry Months = DATEDIFF( utcnow(), [Expiry Date], MONTH)

 

View solution in original post

2 REPLIES 2
d_gosbell
Super User
Super User

If you have the number of days from today until the expiry you could do something like the following to calculate the expiry date

 

Expiry Date = UTCNow() + DaysTilExpiry

 

Then you can calculate the difference between now and the expiry date in months using the DATEDIFF function

 

Expiry Months = DATEDIFF( utcnow(), [Expiry Date], MONTH)

 

Anonymous
Not applicable

Perfect, thank you! 🙂

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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