How to use split function with space as the delimiter

I am trying to group my Products using the first portion of the ProductName. I added a calculated field and used the split() function as:

split({ProductName}, ’ ', 1)

but it keeps returning error.

Special character error on the split delimiter, please use single quotes or double quotes; seems the opening quote looks like an apostrophe:

Syntax (Detailed Function Documentation - click here)
split(expression, delimiter , position)

Incorrect
({ProductName}, ’ ', 1)

Correct
({ProductName}, ’ ', 1)
or
({ProductName}, " ", 1)
Use Single or Double Quotes
QuickSight Screenshot

1 Like