Forum Discussion
M Query Divide
- 5 years ago
Anonymous ,
Guess you got a little confused.
The M-Query should be as follows
= Table.AddColumn(#"Uppercased Text3", "Margin%", each [Margin]/ 100))
where #"Uppercased Text3" is the previous step
Margin% is the new column name
[Margin] is the column that you are going to divide
Hi Anonymous ,
Pls. modify the m query as below and use it for getting the new column
#"Add Column" = Table.AddColumn(#"Changed Type4", "Custom", each [Discount]/ 100)
A Custom column screenshot is as below
Sorry, still not quite sure how to code this.
The correct column actually is called Margin (the original column). I was going to create a new one called Margin%. I am getting an error: "the name Add Column" wasn't recognized.
I tried this:
= Table.AddColumn(#"Uppercased Text3", "Margin%", each #"Add Column" = Table.AddColumn(#"Changed Type4", "Margin%", each [Margin]/ 100))
- Thejeswar5 years agoSuper User
Anonymous ,
Guess you got a little confused.
The M-Query should be as follows
= Table.AddColumn(#"Uppercased Text3", "Margin%", each [Margin]/ 100))
where #"Uppercased Text3" is the previous step
Margin% is the new column name
[Margin] is the column that you are going to divide