March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have day of the year. I need to populate date from the day. I cant find which date function to use. I converted the data type from number to date, but it returns the previous date. with year as 1900. See sample below. Please help!
Day of the year | Date in Power BI | Actual Date |
281 | 7th October 1900 | 8th October 2018 |
282 | 8th october 1900 | 9th October 2018 |
Thanks in advance.
Solved! Go to Solution.
I haven't really tested this but the DATE function deals with numbers in a way that should help you.
'date calc'[day] is your 281, for example.
Column = DATE(2018,1,'date calc'[day])
Apologies for the delayed reply. This solution worked! Thanks!
Apologies for the delayed reply. This solution worked! Thanks!
Hi @Anonymous,
By my tests, the fomula of HotChilli should solve your problem.
If you solved your problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Try HotChilli's solution first.
Microsoft counts date from 1st January 1900. So the 281st day happened to be the day 7th October 1900.
This silly hack may work:
Date = 'Table'[Day of the Year]+43103
I haven't really tested this but the DATE function deals with numbers in a way that should help you.
'date calc'[day] is your 281, for example.
Column = DATE(2018,1,'date calc'[day])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |