Forum Discussion
Multiple Rows in one column need to be combined as Single row seperating Commas
Hello All,
Need a Help.
| Major Incident number | Incident Number | Description | Start Time | End Time | Status | Priority |
| 22222 | Inc01 | Test 1 | 1/31/2023 | 2/1/2023 | Resolved | Critical |
| 22222 | Inc02 | Test 2 | 1/30/2023 | 2/1/2023 | Resolved | Critical |
| 33333 | Inc03 | Test 3 | 1/29/2023 | 2/1/2023 | Resolved | Critical |
| 44444 | Inc04 | Test 4 | 1/28/2023 | 2/1/2023 | Resolved | Critical |
| 55555 | Inc05 | Test 5 | 1/26/2023 | 2/1/2023 | Resolved | Critical |
| 66666 | Inc06 | Test 6 | 1/31/2023 | 2/1/2023 | Resolved | Critical |
| 66666 | Inc07 | Test 7 | 1/30/2023 | 2/1/2023 | Resolved | Critical |
| 11111 | Inc08 | Test 8 | 1/29/2023 | 2/1/2023 | Resolved | Critical |
| 55555 | Inc09 | Test 9 | 1/28/2023 | 2/1/2023 | Resolved | Critical |
| 55555 | Inc10 | Test 10 | 1/26/2023 | 2/1/2023 | Resolved | Critical |
| 33333 | Inc11 | Test 11 | 1/31/2023 | 2/1/2023 | Resolved | Critical |
| 33333 | Inc12 | Test 12 | 1/30/2023 | 2/1/2023 | Resolved | Critical |
| 44444 | Inc13 | Test 13 | 1/29/2023 | 2/1/2023 | Resolved | Critical |
I have a above table in PowerBI with 7 Columns. But, what i originally wanted was for the Incident numbers to display one underneath the other in a single cell as below. Is it possible in powerbi?
| Major Incident number | Incident Number | Description | Start Time | End Time | Status | Priority |
| 22222 | Inc01 Inc02 | Test 1 | 1/31/2023 | 2/1/2023 | Resolved | Critical |
| 33333 | Inc03 Inc11 Inc12 | Test 3 | 1/29/2023 | 2/1/2023 | Resolved | Critical |
| 44444 | Inc04 Inc13 | Test 4 | 1/28/2023 | 2/1/2023 | Resolved | Critical |
| 55555 | Inc05 Inc09 Inc10 | Test 5 | 1/26/2023 | 2/1/2023 | Resolved | Critical |
| 66666 | Inc06 Inc07 | Test 6 | 1/31/2023 | 2/1/2023 | Resolved | Critical |
| 11111 | Inc08 | Test 8 | 1/29/2023 | 2/1/2023 | Resolved | Critical
|
Thank you
Regards
Arun
Hi yingyinr,
It works for me. We dont need "Commas" for seperating Incident number. Incident numbers need to display one underneath the other in a single cell as below.
Inc01
Inc02
Inc03
- Anonymous3 years ago
Hi arun2001mjl ,
You can update the formula of measure [Incidents] as below to get it:
Incidents =VAR _selmincident =SELECTEDVALUE ( 'Table'[Major Incident number] )RETURNCONCATENATEX (FILTER ( 'Table', 'Table'[Major Incident number] = _selmincident ),'Table'[Incident Number],UNICHAR(10))Best Regards
4 Replies
- AnonymousNot applicable
Hi arun2001mjl ,
You can create a measure as below to get it by using the function CONCATENATEX, please find the details in the attachment.
Incidents = VAR _selmincident = SELECTEDVALUE ( 'Table'[Major Incident number] ) RETURN CONCATENATEX ( FILTER ( 'Table', 'Table'[Major Incident number] = _selmincident ), 'Table'[Incident Number], "," )If the above one can't help you get the expected result, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
- arun2001mjl
Helper II
Hi yingyinr,
It works for me. We dont need "Commas" for seperating Incident number. Incident numbers need to display one underneath the other in a single cell as below.
Inc01
Inc02
Inc03
- AnonymousNot applicable
Hi arun2001mjl ,
You can update the formula of measure [Incidents] as below to get it:
Incidents =VAR _selmincident =SELECTEDVALUE ( 'Table'[Major Incident number] )RETURNCONCATENATEX (FILTER ( 'Table', 'Table'[Major Incident number] = _selmincident ),'Table'[Incident Number],UNICHAR(10))Best Regards
- arun2001mjl
Helper II
Thank you very much. I will test this and accept the solution as completed.