Forum Discussion

arun2001mjl's avatar
arun2001mjl
Icon for Helper II rankHelper II
3 years ago
Solved

Multiple Rows in one column need to be combined as Single row seperating Commas

Hello All,

 

Need a Help.

 

Major Incident numberIncident NumberDescriptionStart TimeEnd TimeStatusPriority
22222Inc01Test 11/31/20232/1/2023ResolvedCritical
22222Inc02Test 21/30/20232/1/2023ResolvedCritical
33333Inc03Test 31/29/20232/1/2023ResolvedCritical
44444Inc04Test 41/28/20232/1/2023ResolvedCritical
55555Inc05Test 51/26/20232/1/2023ResolvedCritical
66666Inc06Test 61/31/20232/1/2023ResolvedCritical
66666Inc07Test 71/30/20232/1/2023ResolvedCritical
11111Inc08Test 81/29/20232/1/2023ResolvedCritical
55555Inc09Test 91/28/20232/1/2023ResolvedCritical
55555Inc10Test 101/26/20232/1/2023ResolvedCritical
33333Inc11Test 111/31/20232/1/2023ResolvedCritical
33333Inc12Test 121/30/20232/1/2023ResolvedCritical
44444Inc13Test 131/29/20232/1/2023ResolvedCritical

 

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 numberIncident NumberDescriptionStart TimeEnd TimeStatusPriority
22222Inc01
Inc02
Test 11/31/20232/1/2023ResolvedCritical
33333Inc03
Inc11
Inc12
Test 31/29/20232/1/2023ResolvedCritical
44444Inc04
Inc13
Test 41/28/20232/1/2023ResolvedCritical
55555Inc05
Inc09
Inc10
Test 51/26/20232/1/2023ResolvedCritical
66666Inc06
Inc07
Test 61/31/20232/1/2023ResolvedCritical
11111Inc08Test 81/29/20232/1/2023Resolved

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

  • Anonymous's avatar
    Anonymous
    3 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] )
    RETURN
        CONCATENATEX (
            FILTER ( 'Table', 'Table'[Major Incident number] = _selmincident ),
            'Table'[Incident Number],
            UNICHAR(10)
        )

    Best Regards

4 Replies

  • Anonymous's avatar
    Anonymous
    Not 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's avatar
      arun2001mjl
      Icon for Helper II rankHelper 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

  • Thank you very much. I will test this and accept the solution as completed.