Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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"
Solved! Go to Solution.
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
Proud to be a Super User!
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
Proud to be a Super User!
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!
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
Proud to be a Super User!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 47 | |
| 39 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 83 | |
| 70 | |
| 38 | |
| 28 | |
| 27 |