Forum Discussion
PQ how to duplicate column ?
Hi All
So that i can splite the below field for create brand field and still keep the org field.
Hi Anonymous
You can use the Text functions like Text.Start to create a new column from a sub-string of your Stock Description text. Eactly what part of that description forms the brand?
Phil
Hi Anonymous
The line you need is
#"Added Custom" = Table.AddColumn(#"Removed Columns", "Brand", each if Text.Length([Stock Description]) > 0 then Text.Start([Stock Description], Text.PositionOf([Stock Description], " ")) else "")I've added it to your PBIX file so download that from here.
Regards
Phil
Anonymous
you can also try to create a custom column. Just double click the column name in the list on the right side and click ok.
8 Replies
- PhilipTreacy
Super User
Hi Anonymous
You can use the Text functions like Text.Start to create a new column from a sub-string of your Stock Description text. Eactly what part of that description forms the brand?
Phil
- AnonymousNot applicable
Hi Phil
thank you for your advise.
I get the first word of the Description field to form the Brand.
for example :- Desciption =Beckhoff BC9000
Brand = Bekhoff
Paul
- AnonymousNot applicable
Hi Phil
Can you show me how you do it , as i cannot understand .
https://www.dropbox.com/s/j7gfpwtid67c63m/ask%20recode%20brand%20v001.pbix?dl=0
above is my PBI file
Paul
- Ashish_Mathur
Super User
Hi,
If you want a calculated column solution in DAX, then try this
Column = TRIM(LEFT(SALES[Stock Description],SEARCH(" ",SALES[Stock Description],1,BLANK())))Hope this helps.
- PhilipTreacy
Super User
Hi Anonymous
The line you need is
#"Added Custom" = Table.AddColumn(#"Removed Columns", "Brand", each if Text.Length([Stock Description]) > 0 then Text.Start([Stock Description], Text.PositionOf([Stock Description], " ")) else "")I've added it to your PBIX file so download that from here.
Regards
Phil
- AnonymousNot applicable
Hi Phil
Thank you very much. May i know how you do it ?
Pls share few screen shot.
Paul
- ryan_mayu
Super User
Anonymous
you can also try to create a custom column. Just double click the column name in the list on the right side and click ok.