Create a combined lookup key
This joins the Salesperson and Month columns with a vertical bar. It is useful for matching rows or creating a unique label.
[Salesperson] & "|" & [Month]
A clear guide to joining Salesperson and Month values, then turning month names into valid dates without expression errors.
Small syntax issue. Simple fix.
Follow the formula structure below.
Your #date formula starts with an opening parenthesis after #date, but it does not finish with a closing parenthesis. Add one ) after the final 1 to complete the function.
Step-by-step guide
In Power Query, select Add Column → Custom Column, then paste the formula that matches your goal.
This joins the Salesperson and Month columns with a vertical bar. It is useful for matching rows or creating a unique label.
[Salesperson] & "|" & [Month]
Use this safer formula if names or month values may contain accidental spaces or non-printing characters.
Text.Clean(Text.Trim([Salesperson])) & "|" & Text.Clean(Text.Trim([Month]))
The #date function needs three values: year, month, and day. Your formula has all three values, but the opening bracket is never closed.
Corrected formula
= #date(2025,
if [Month] = "January" then 1
else if [Month] = "February" then 2
else if [Month] = "March" then 3
else if [Month] = "April" then 4
else if [Month] = "May" then 5
else if [Month] = "June" then 6
else if [Month] = "July" then 7
else if [Month] = "August" then 8
else if [Month] = "September" then 9
else if [Month] = "October" then 10
else if [Month] = "November" then 11
else 12,
1)
Helpful checks
Month text must match the formula exactly, including spelling and capitalization.
The final else 12 treats any unmatched value as December, so review your source data first.
Whenever a function begins with (, make sure it ends with a matching ) after its final value.