Forum Discussion
Using CONCATENATEX to combine multiple rows by project ID
- 4 years ago
Hey mstone ,
Can you try to copy and paste one of the following expressions?
Combined column = CALCULATE(CONCATENATEX(DIM_PROJECT_RISK, [RiskTitle], UNICHAR(10)), ALLEXCEPT(DIM_PROJECT_RISK, DIM_PROJECT_RISK[ProjectId]))AsMeasure = CALCULATE(CONCATENATEX(VALUES(DIM_PROJECT_RISK[RiskTitle]), [RiskTitle], UNICHAR(10)), ALLEXCEPT(DIM_PROJECT_RISK, DIM_PROJECT_RISK[ProjectId]))Here is a link you can download to a sample: https://1drv.ms/u/s!An8CCFsOzw0uhQYExSCu5Hj9NDon?e=7B3enE
mstone
Can you paste here a screenshot of dummy data that represent your data table?
Sorry for the delay. Here is an example of what it looks like now and how I would like it to look:
ProjectID | Risks |
PRJ6319 | Risk 1 |
PRJ6320 | Risk 1 |
PRJ6320 | Risk 2 |
PRJ6320 | Risk 3 |
PRJ6321 | Risk1 |
PRJ6321 | Risk 2 |
ProjectID | Risks |
|
PRJ6319 | Risk 1 |
|
PRJ6320 | Risk 1 Risk 2 Risk 3 |
|
PRJ6321 | Risk 1 Risk 2 |
|
- mstone4 years agoHelper I
The tables didn't paste as desired but the idea is to combine the risks in a single cell so the result is a single project number entry. Thank you!
- hnguy714 years agoSuper User
hi mstone ,
You can use the CONCATENATEX function. Please see the measure below with expected output:
Risks := CONCATENATEX(Risks, Risks[Risks], UNICHAR(10))- mstone4 years agoHelper I
Thank you, hnguy71! Will that parse them by projectID? The orginal data is not in sequence. It consists of different risk statements. I'll give it a try.
- mstone4 years agoHelper I
Using that syntax, I ended up with all entries from all projects combined in one list rather than parsed by project. Is there something I can do to modify the formula?
Combined column = CONCATENATEX(DIM_PROJECT_RISK,DIM_PROJECT_RISK[RiskTitle],unichar(10))
- Ashish_Mathur4 years agoSuper User
Hi,
Try this measure
All risks = CONCATENATEX(VALUES(Data[Risks]),Data[Risks],",")Drag Project ID and the All Risks measure to the Table visual.
Hope this helps.