Forum Discussion
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"
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
3 Replies
- Nathaniel_CCommunity Champion
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- AnonymousNot 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_CCommunity 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