Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Solved! Go to Solution.
hi @Anonymous
First, you should know that the difference between calculate column and custom column in power bi.
https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/
You could use DAX Function to create a column column(New column), and use M language to create a custom column in edit query.
second, in edit query, you could just use Date.EndOfYear to get your requirement.
=Date.EndOfYear([Service Through Date])
https://docs.microsoft.com/en-us/powerquery-m/date-endofyear
Result:
Regards,
Lin
hi @Anonymous
First, you should know that the difference between calculate column and custom column in power bi.
https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/
You could use DAX Function to create a column column(New column), and use M language to create a custom column in edit query.
second, in edit query, you could just use Date.EndOfYear to get your requirement.
=Date.EndOfYear([Service Through Date])
https://docs.microsoft.com/en-us/powerquery-m/date-endofyear
Result:
Regards,
Lin
Thank you for the help but I have an error.
I entered the formula:
New Formula = date(year([Service Through Date]),12,31)
I have an expression error that reads: "Expression Error: The name 'date' wasn't recognized. Make sure it's spelled correctly."
I double checked that [Service Through Date] is already in a date format and that it is spelled correctly. I wonder if the command 'Date' in the formula should be something else?
Thank you!
Hi @Anonymous ,
You can try this to troubleshoot. Also, assuming that [Service Through Date] is a column.
Try this measure.
New Formula =
var _year = YEAR('Table'[Service Through Date])
RETURN
DATE(_year,12,31)
Regards,
HN
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.