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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi
Can someone help me correct this:
= Table.AddColumn(#"Changed Type1", "Charge", if [Freight_Kind] = "ABC" and [Category] = "BBC" or "BBD" then 10.5 else 0)
error Im getting is:
Expression.Error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an 'each' expression?
Thanks so much!
Solved! Go to Solution.
Then you should provide a sample...
or...
= Table.AddColumn(#"Changed Type1", "Charge", each if [Freight_Kind]="ABC" and ([Category]="BBC"or [Category]="BBD") then 10.5 else 0)
And you can play with parenthesis...
= Table.AddColumn(#"Changed Type1", "Charge", if [Freight_Kind] = "ABC" and [Category] = "BBC" or [Category]="BBD" then 10.5 else 0)
Thanks for your quick response but Im still getting the same error?
Then you should provide a sample...
or...
= Table.AddColumn(#"Changed Type1", "Charge", each if [Freight_Kind]="ABC" and ([Category]="BBC"or [Category]="BBD") then 10.5 else 0)
And you can play with parenthesis...
Thats done it, thanks so much!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!