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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.