Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I read the tutorial on Microsoft website about how to create a date table with Power Query, but it seems that the tutorial doesn't consider the leap year, as there are 366 days in a leap year. How to modify this query? Sorry, I am not very familar with M language.
Create a date table - Training | Microsoft Learn
Thanks
Instead of 365*10 use
Duration.TotalDays(#date(2021,5,31) - #date(2011,5,31) )+ 1
That formula is giving the number of dates in your list (365*10, Ora list of 3650 dates). It's not saying 365 days per year.
--Nate
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
6 | |
6 | |
6 | |
5 |
User | Count |
---|---|
9 | |
9 | |
8 | |
6 | |
6 |