Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Solved! Go to Solution.
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)
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)
Perfect, thank you! 🙂
User | Count |
---|---|
76 | |
75 | |
40 | |
27 | |
24 |
User | Count |
---|---|
96 | |
92 | |
52 | |
46 | |
42 |