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.
I need to calculate the number of days in a specific year without referencing another table. I am calculating for the years: 2017, 2018, 2019, & 2020.
Solved! Go to Solution.
Hello @Anonymous
These should get you there.
Days 2017 = DATEDIFF ( DATE ( 2017, 1, 1), DATE ( 2017, 12, 31), DAY )
Days 2018 = DATEDIFF ( DATE ( 2018, 1, 1), DATE ( 2018, 12, 31), DAY )
Days 2019 = DATEDIFF ( DATE ( 2019, 1, 1), DATE ( 2019, 12, 31), DAY )
Days 2020 = DATEDIFF ( DATE ( 2020, 1, 1), DATE ( 2020, 12, 31), DAY )
Hello @Anonymous
These should get you there.
Days 2017 = DATEDIFF ( DATE ( 2017, 1, 1), DATE ( 2017, 12, 31), DAY )
Days 2018 = DATEDIFF ( DATE ( 2018, 1, 1), DATE ( 2018, 12, 31), DAY )
Days 2019 = DATEDIFF ( DATE ( 2019, 1, 1), DATE ( 2019, 12, 31), DAY )
Days 2020 = DATEDIFF ( DATE ( 2020, 1, 1), DATE ( 2020, 12, 31), DAY )