Forum Discussion
Anonymous
2 years agoNot applicable
Add column to get particular value and fill down in Query M code
Hi, I hope to make a new column in Query using M code like below: To give Quarter number attribute to all row values. Please help.
- 2 years ago
Anonymous
maybe you can try this
1. add a new column
=if Text.Contains([comments],"Q1") or Text.Contains([comments],"Q2") or Text.Contains([comments],"Q3") or Text.Contains([comments],"Q4") then [comments] else null
then select the new column and fill down
- 2 years ago
you can change to
=if [comments]="Q1"or [comments]="Q2" or [comments]="Q3" or [comments]="Q4" then [comments] else null