From your first post, it looks like you've already used the Advanced Editor in Power Query to add a Custom Column, using the code snippet you reference. Just replace that line in the query with my suggested changes and see how you go.
If you still have problems, can you post your whole query, so I can show you exactly what to change?
Cheers,
Steve.