Forum Discussion
santu1021
Helper II
6 years agoeliminate duplicates from one cell
how to eliminate duplicates from one cell. In below example "TELESCOPIC HANDLERS" is repeating serveral times. How to eliminate duplicates?
- Anonymous6 years ago
HI santu1021,
You can take a look at the following methods if they meet for your requirements.
#1. Power query custom column:
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Combine(List.Distinct(Text.Split([ProdcutType],",")),","))#2. Dax calculated column:
Distinct Product = VAR _path = SUBSTITUTE ( [ProductType], ",", "|" ) VAR _lengh = PATHLENGTH ( _path ) VAR itemList = DISTINCT ( SELECTCOLUMNS ( GENERATESERIES ( 1, _lengh , 1 ), "ProductType", PATHITEM ( _path, [Value] ) ) ) RETURN CONCATENATEX ( itemList, [ProductType], "," )Regards,
Xiaoxin Sheng
Anonymous
6 years agoNot applicable
HI santu1021,
You can take a look at the following methods if they meet for your requirements.
#1. Power query custom column:
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Combine(List.Distinct(Text.Split([ProdcutType],",")),","))
#2. Dax calculated column:
Distinct Product =
VAR _path =
SUBSTITUTE ( [ProductType], ",", "|" )
VAR _lengh =
PATHLENGTH ( _path )
VAR itemList =
DISTINCT (
SELECTCOLUMNS (
GENERATESERIES ( 1, _lengh , 1 ),
"ProductType", PATHITEM ( _path, [Value] )
)
)
RETURN
CONCATENATEX ( itemList, [ProductType], "," )
Regards,
Xiaoxin Sheng