Forum Discussion
taher
9 years agoHelper II
concatenate Values repeatly
Hi All, as you can see in the photo, I have a table of two columns. StoreId: every value is repeated three times because every value has three TagId. I'm trying to create a new column which con...
- 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
taher
9 years agoHelper II
Hi ImkeF;
this code seems strange to me.
Can you please suggest me a tutorial for beginners to learn this type of coding.
Best,
Taher
ImkeF
9 years agoCommunity Champion
Showing how to incorporate the code from above into your solution: http://community.powerbi.com/t5/Webinars-and-Video-Gallery/Power-BI-Forum-Help-How-to-integrate-M-code-into-your-existing/m-p/179314
Some learning resources for M: http://www.thebiccountant.com/learning-resources/