Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi,
I currently have a column 'Done' where Rows contain either a date, or are blank. I'm creating a new custom column that turns these dates into 'week commencing' dates. my query so far is;
#"Inserted Start of Week" = Table.AddColumn(#"Filtered Rows", "Start of Week", each Date.StartOfWeek(DateTime.From([Done])), type datetime)
in
#"Inserted Start of Week"
This works for those rows with dates, but throws errors where the row is blank. My thought was to include an 'otherwise null' expression, but whatever I try results in either a 'token literal expected' or 'token comma expected' syntax error.
Can anyone help?
Solved! Go to Solution.
Hi @ChrisBroome
Try this
= Table.AddColumn(#"Filtered Rows", "Start of Week", each try Date.StartOfWeek(DateTime.From([Done])) otherwise null)
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Hi @ChrisBroome
Try this
= Table.AddColumn(#"Filtered Rows", "Start of Week", each try Date.StartOfWeek(DateTime.From([Done])) otherwise null)
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.