Forum Discussion
Anonymous
6 years agoNot applicable
Powerquery IF Statement
I need to write a custom column in powerquery that returns a value of "1" for "Budget" in the column DataType and a value of "2" for "Forecast"
- 6 years ago
Hi Anonymous ,
Go to add column tab, Conditional Column, and fill in the boxes as below.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Anonymous
6 years agoNot applicable
I also determined that if you complete the custom column in m language it automatically converts it into a conditional column.
Thank You very much!
Nathaniel_C
6 years agoCommunity Champion
Hi Anonymous ,
Yes, that is true. Once you work more with Power Query, you will be able to write all your columns as custom columns. The trick is study how the Advanced Editor changes the syntax. KenPuls has written a great book M is for (Data) Monkey, gives you lots of tips, tricks and patterns.
You are very welcome!
Nathaniel