Forum Discussion
CoreyLearnsBI
3 years agoFrequent Visitor
Adding More Than One Custom Column
How do I get my query to show all 4 custom columns I've created? It's only showing 1 of the 4 custom columns, despite having 4 separate steps to add 4 custom columns. Here is an example of 1 of t...
Chewdata
2 years agoResponsive Resident
Can you post the entire M-code for the query?
Go to advanced editor and copy.
- Chewdata2 years agoResponsive Resident
Like Anonymous says, you should reference the previous step in your code. The code should look something like this:
let Source = YOURSOURCE, #"Changed Type" = Table.TransformColumnTypes(Source,{{"Input", Int64.Type}}), add_Custom1 = Table.AddColumn(#"Changed Type", "Custom1", each [Input] + 1), add_Custom2 = Table.AddColumn(add_Custom1, "Custom2", each [Input] + 2), add_Custom3 = Table.AddColumn(add_Custom2, "Custom3", each [Input] + 3), add_Custom4 = Table.AddColumn(add_Custom3, "Custom4", each [Input] + 4) in add_Custom4all steps are referencing the previous step. Finaly the last step is referenced in the 'in' part of the code, so all steps are evaluated and loaded.