Forum Discussion
concatenate Values repeatly
- 9 years ago
Hi Taher,
If you want it in DAX, you could try these two options.
Option 1: there will be duplicate rows.
New = CALCULATE ( CONCATENATEX ( 'Table1', 'Table1'[TagId], "-" ), FILTER ( 'Table1', 'Table1'[StoreId] = EARLIER ( Table1[StoreId] ) ) )Option 2: create a new table.
Table = SUMMARIZE ( 'Table1', 'Table1'[StoreId], "NewColumn", CONCATENATEX ( 'Table1', 'Table1'[TagId], "-" ) )Best Regards!
Dale
Hi Taher,
If you want it in DAX, you could try these two options.
Option 1: there will be duplicate rows.
New =
CALCULATE (
CONCATENATEX ( 'Table1', 'Table1'[TagId], "-" ),
FILTER ( 'Table1', 'Table1'[StoreId] = EARLIER ( Table1[StoreId] ) )
)
Option 2: create a new table.
Table =
SUMMARIZE (
'Table1',
'Table1'[StoreId],
"NewColumn", CONCATENATEX ( 'Table1', 'Table1'[TagId], "-" )
)
Best Regards!
Dale
- taher9 years agoHelper II
Hi v-jiascu-msft,
sorry, I was on holiday, so I have not tried it until today.
It did work with Summerize, thanks.
I would be interested if it could work without adding a new table, I mean is there an alternative option, which enables me doing this concatenating within my base table.
Thank u all :)
Taher
- v-jiascu-msft9 years agoMicrosoft Employee
Hi Taher,
Did you try option 1? You don't need to create a new table with this option.
Best Regards!
Dale
- taher9 years agoHelper II
Hi v-jiascu-msft,
it is working thank you. But I am now in a new trouble.
I need to split the calculated column.
I can't see the new column or even the new table in the query editor. With M script I got a syntax error.
Best,
Taher