Forum Discussion
Add column to get particular value and fill down in Query M code
- 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
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
- Anonymous2 years agoNot applicable
Thanks! accpeted.
- ryan_mayu2 years ago
Super User
you are welcome
- Anonymous2 years agoNot applicable
Hi,
As to Text.Contains, can we change M code to exact Q1~Q4 value not contains?
- ryan_mayu2 years ago
Super User
you can change to
=if [comments]="Q1"or [comments]="Q2" or [comments]="Q3" or [comments]="Q4" then [comments] else null
- Anonymous2 years agoNot applicable
Thanks!