Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Is there such a formula in Power Query Custom Column for this:
if ([BUSINESS_UNIT]='ZZZ' and STARTSWITH([ORDER_TYPE],'Standard')) then 'True'
elseif ([BUSINESS_UNIT]='ZZZ' and STARTSWITH([ORDER_TYPE],'Project')) then 'True'
elseif ([BUSINESS_UNIT]='XX' and STARTSWITH([ORDER_TYPE],'Project')) then 'True'
elseif ([BUSINESS_UNIT]='ZZZ' and STARTSWITH([ORDER_TYPE],'Standard')) then 'True'
elseif ([BUSINESS_UNIT]='AAA' and NOT STARTSWITH(STR([ORDER_NUMBER]),'9')) then 'True'
elseif ([BUSINESS_UNIT]='AAA' and NOT STARTSWITH(STR([ORDER_NUMBER]),'7')) then 'True'
else 'False' END
Solved! Go to Solution.
@Anonymous , and using lower case:
not (...)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Stand with Ukraine!
Here is an official way you can support Ukraine financially:
Come Back Alive foundation: https://savelife.in.ua/en/
Thank you!
@Anonymous , Try like
if [BUSINESS_UNIT]="ZZZ" and Text.StartsWith([ORDER_TYPE],"Standard") then "True"
else if [BUSINESS_UNIT]="ZZZ" and Text.StartsWith([ORDER_TYPE],"Project") then "True"
else if [BUSINESS_UNIT]="XX" and Text.StartsWith([ORDER_TYPE],"Project") then "True"
else if [BUSINESS_UNIT]="ZZZ" and Text.StartsWith([ORDER_TYPE],"Standard") then "True"
else if [BUSINESS_UNIT]="AAA" and NOT Text.StartsWith(STR([ORDER_NUMBER]),"9") then "True"
else if [BUSINESS_UNIT]="AAA" and NOT Text.StartsWith(STR([ORDER_NUMBER]),"7") then "True"
else "False"
@Anonymous , Sorry, Number.ToText in place of STR
if [BUSINESS_UNIT]="ZZZ" and Text.StartsWith([ORDER_TYPE],"Standard") then "True"
else if [BUSINESS_UNIT]="ZZZ" and Text.StartsWith([ORDER_TYPE],"Project") then "True"
else if [BUSINESS_UNIT]="XX" and Text.StartsWith([ORDER_TYPE],"Project") then "True"
else if [BUSINESS_UNIT]="ZZZ" and Text.StartsWith([ORDER_TYPE],"Standard") then "True"
else if [BUSINESS_UNIT]="AAA" and NOT Text.StartsWith(Number.ToText([ORDER_NUMBER]),"9") then "True"
else if [BUSINESS_UNIT]="AAA" and NOT Text.StartsWith(Number.ToText([ORDER_NUMBER]),"7") then "True"
else "False"
@amitchandak the NOT sign is causing the error. IS there an alternative for NOT?
@Anonymous , try to use brackets near not:
not (...)
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Stand with Ukraine!
Here is an official way you can support Ukraine financially:
Come Back Alive foundation: https://savelife.in.ua/en/
Thank you!
@Anonymous , and using lower case:
not (...)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Stand with Ukraine!
Here is an official way you can support Ukraine financially:
Come Back Alive foundation: https://savelife.in.ua/en/
Thank you!
| User | Count |
|---|---|
| 58 | |
| 46 | |
| 31 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 78 | |
| 66 | |
| 45 | |
| 25 | |
| 22 |