Forum Discussion

samdthompson's avatar
samdthompson
Copper Contributor
Jun 15, 2023
Solved

spilling conditional textjoin

Hello, I am needing some help to make a spilling conditional textjoin. I can do this in power query no worries but thats not an option in this case, it has to be done by formula and it must spill.  ...
  • Patrick2788's avatar
    Patrick2788
    Jun 15, 2023

    samdthompson 

    If you're going to add more days, then maybe MAKEARRAY is the ticket:

     

     

    =LET(
        rows, ROWS(D13#),
        uDays, UNIQUE(D12#, 1),
        cols, COLUMNS(uDays),
        MAKEARRAY(
            rows,
            cols,
            LAMBDA(r, c,
                LET(
                    d, INDEX(uDays, , c),
                    TEXTJOIN(",", , FILTER(CHOOSEROWS(D13#, r), D12# = d))
                )
            )
        )
    )

     

Resources