Forum Discussion

itEquilibria's avatar
itEquilibria
New Member
5 years ago
Solved

Combine not empty cells from almost empty rows

Hi! I have this table:

IdNameItemsDate
1AItem 101-01-2021
  Item 2 
2BItem 301-02-2021
3CItem 401-01-2021
  Item 5 
  Item 6 

 

The data in the rows with the empty cells in Id, Name and Date belong to the previous not empty row, I need to combine the the data with a delimmter like this:

 

IdNameItemsDate
1AItem 1,Item 201-01-2021
2BItem 301-02-2021
3CItem 4,Item 5,Item 601-01-2021
  • Hi itEquilibria ,

     

    According to your description, you first need to use the filled down function in the power query. Then create a column and filter the rows whose ID is not empty in the table visual. I did a test, the reference is as follows:

    Column = 
    CALCULATE (
        CONCATENATEX ( VALUES ( 'Table'[Items] ), 'Table'[Items], "," ),
        ALLEXCEPT ( 'Table', 'Table'[Id] )
    )

     


    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    You should fill the empry cells in Power Query using the Fill down option. You can then use CONCATENATEX to get the expected output

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Community Support

    Hi itEquilibria ,

     

    According to your description, you first need to use the filled down function in the power query. Then create a column and filter the rows whose ID is not empty in the table visual. I did a test, the reference is as follows:

    Column = 
    CALCULATE (
        CONCATENATEX ( VALUES ( 'Table'[Items] ), 'Table'[Items], "," ),
        ALLEXCEPT ( 'Table', 'Table'[Id] )
    )

     


    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.