Forum Discussion

Wresen's avatar
Wresen
Icon for Post Patron rankPost Patron
3 years ago
Solved

Combine values on each row

Hi and thanks for reading this.

I have a little problem and i have no clue how to do it , it seemed easy when i started to think about it 🙂

I have a tabel like below:

I would like to create a column like the picture below(Yellow column) where i combine All column "store" values on each row.


Thanks so much.

  • Try adding this as a calculated column:

     

     

    Comb =
    CALCULATE(CONCATENATEX('your table name',[Store],"/",1),ALL('your table name'),your table name'[What]=EARLIER('your table name'[What]) 

     

6 Replies

  • halfglassdarkly's avatar
    halfglassdarkly
    Icon for Responsive Resident rankResponsive Resident

    Try adding this as a calculated column:

     

     

    Comb =
    CALCULATE(CONCATENATEX('your table name',[Store],"/",1),ALL('your table name'),your table name'[What]=EARLIER('your table name'[What]) 

     

  • Hi again
    halfglassdarkly 

    It worked as i asked for but found a thing that i did not want .

    It is possible to do the the store value unique.

    If i would have like below: 

    Comb on Red will A/A/B
    I would like it to be only A/B

    • Wresen's avatar
      Wresen
      Icon for Post Patron rankPost Patron

      Found the solution:

      Comb = 
       CALCULATE(CONCATENATEX(DISTINCT('Table'[store]),'Table'[store],"/",1),ALL('Table'),'Table'[What]=EARLIER('Table'[What]) )
    • halfglassdarkly's avatar
      halfglassdarkly
      Icon for Responsive Resident rankResponsive Resident

      Try this and see if it works for you:

      Comb =
      CALCULATE(CONCATENATEX(DISTINCT('your table name'),[Store],"/",1),ALL('your table name'),your table name'[What]=EARLIER('your table name'[What]) 

       

      • Wresen's avatar
        Wresen
        Icon for Post Patron rankPost Patron

        Hi halfglassdarkly 
        Did not get yours to work , but with small modification as below it worked .
        Thanks so much