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,
It seems I've wrongly imagined that I need to concatenate the column.
I need to use the TagId as a filter in the report, the TagId itself doesn't be allowed to filter each other, because of that I thought the best way is to split them in one row so every StoreId can get its 3 TagId without any problem and then can I filter by TagId.
Any idea from you would be great :)
Hi Taher,
Why can't TagId filter each other? Could you please post a sample? It's a good idea to create a new thread if it's different with this topic. That would be great for others to search solutions in the community.
Best Regards!
Dale
- taher9 years agoHelper II
Hello v-jiascu-msft,
I'm sorry for not replying quickly. I'm writing exams for the university.
This is the full description of the data the report which I make.
From the table 'Tags ' I should get the TagID that tell me which StoreID ordered to which TagID.
Then the StoreID is connected to its info Table 'Stores ' which is to the main Table 'Answers' connected.
Now I am getting answers to questions from the main table.
What has TagID to do in my report? every TagID has a 'name' that is the person who sends me the answers and a ParentTagID which order the type of person (boss, normal employee, student employee) that's why for every store there are three Tags.
Now in the report, the user must filter the report due to the three Tags, because the Boss has many employees and the employee has many student employees.
so I choose the Boss then I get the employees according to this Boss and so on!
- v-jiascu-msft9 years agoMicrosoft Employee
Hi taher,
Maybe we could add a new column "boss" to the table "tags". Then the "tags" would be like the upper of the picture. Finally, it's easy to add slicers. Could you please post a little sample of table "tags"?
Best Regards!
Dale
- taher9 years agoHelper II
Hello v-jiascu-msft,
hier you find a full sample project.
ParentTagID = 150 =>Boss
ParentTagID = 140 =>Worker
ParentTagID = 130 =>Student.
https://www.4shared.com/s/fWHB5XsRDei
as you can see when I filter due to StoreName, the three Boss, worker and the student are appearing in the three slicers.
It should just on of them for each slicer according to its PaentTagID.
Thanks a lot :)