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,
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
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 :)
- taher9 years agoHelper II
- v-jiascu-msft9 years agoMicrosoft Employee
Hi taher,
I can't download the file from your URL. The download button didn't work. Could you please use GoogleDrive or OneDrive?
Best Regards
Dale
- taher9 years agoHelper II
- v-jiascu-msft9 years agoMicrosoft Employee
Hi Taher,
First, I would recommend a custom slicer.
Add a calculated column first in the table "tags".
PName = IF ( [ParentTagID] = 130, "Student", IF ( [ParentTagID] = 140, "Worker", IF ( [ParentTagID] = 150, "Boss", "Null" ) ) )Second, due to the measure can be put in a slicer, we have to filter these data to a new table.
130 = FILTER ( 'Tags', 'Tags'[ParentTagID] = 130 )
140 = FILTER ( 'Tags', 'Tags'[ParentTagID] = 140 )
150 = FILTER ( 'Tags', 'Tags'[ParentTagID] = 150 )
Best Regards!
Dale
- taher9 years agoHelper II
hello v-jiascu-msft,
we still have the same Problem.
when I for Example filter according to the worker 'Mark', it filters all the Bosses and the Students! But 'Mark' must filter just the ones who ist not in a pair with him in the original table ( Mark has John as a Boss and Andre as a student) these but disappeared too.
It is really difficult, I'v just tried and tried but it would not work.
Best,
Taher