Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
So I'm trying to calculate the number of days for this year, meaning 2/28/2018=the 58th day of the year. I'm using Date Diff, but I keep getting a weird return.
I've tried:
DD = (DATEDIFF(1/1/2018,TODAY(),DAY))
and
DD = (DATEDIFF(TODAY(),12/31/2018,DAY))
both return a value of +/-43,159.
Any ideas on how to fix this?
PJ
Solved! Go to Solution.
Try this
DD = DATEDIFF(Date(2018,1,1),TODAY(),DAY)
What I'm ultimately trying to do is calculate what the previous year did on our current date, meaning if 2/28/18=$10,000, I want to see what last year did on the same day. SO I took the average daily balance from last year and wanted to multiply it by the day, to get the day's average.
Might be a better way to do this so I'll take suggestions, thanks!!
Try this
DD = DATEDIFF(Date(2018,1,1),TODAY(),DAY)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!