The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I'm trying to combine a basic column by using if sentences. However, this
=[Column1] & "/" & if [Column3] = null then [Column7] else ""
However, this produces error "Token Literal expetcted". What is wrong with this simple command..?
Thanks!
Solved! Go to Solution.
Just use Text.Combine Text.Combine - PowerQuery M | Microsoft Docs
The formula would be like this:
Text.Combine({[Column1], if [Column3] = null then [Column7] else ""}, "/")
All you need to do to fix this is put parentheses around the if statement so that it evaluates the expression in the order you intend.
= [Column1] & "/" & (if [Column3] = null then [Column7] else "")
Just use Text.Combine Text.Combine - PowerQuery M | Microsoft Docs
The formula would be like this:
Text.Combine({[Column1], if [Column3] = null then [Column7] else ""}, "/")