Forum Discussion
cristianml
Post Prodigy
5 years agoCostume formula issue in Editor
Hi, I need to create a custom column with the following formula in the query editor but it gives me an error : IF([#"Type / Cost Center Career Track"]="Subcontractor","Subcontractor",IF([#"Type ...
- 4 years ago
Hi, cristianml ;
You could modify it as follows:
= Table.AddColumn(#"Replaced Value", "Custom", each if [#"Type/Cost Center Career Track"] = "Subcontractor" then "Subcontractor" else if [#"Type/Cost Center Career Track"] = "Unassigned" then "Unassigned" else "0"&[Level])"If " in power query : if ...then... else;
"If" in dax: IF(<logical_test>, <value_if_true>[, <value_if_false>])
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
Community Support
4 years agoHi, cristianml ;
You could modify it as follows:
= Table.AddColumn(#"Replaced Value", "Custom", each if [#"Type/Cost Center Career Track"] = "Subcontractor" then "Subcontractor" else if [#"Type/Cost Center Career Track"] = "Unassigned" then "Unassigned" else "0"&[Level])
"If " in power query : if ...then... else;
"If" in dax: IF(<logical_test>, <value_if_true>[, <value_if_false>])
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
cristianml
Post Prodigy
4 years agoThank you very much !!