Forum Discussion

jorgeslzr's avatar
jorgeslzr
Frequent Visitor
5 years ago
Solved

table into list

I have the first 4 columns of the table in the image below (until [PLACEMENT]). I want to add the other two columns on the right.

The first one lists all products that have a promo in the same period, while the other one lists all products that have a placement.

 

Thanks

 

3 Replies

  • jorgeslzr , Try

     

    column for all in promo = concatenatex(filter(Table, [Promo Title] = earlier( [Promo Title] ) ),[Product] )


    column for all in Placement = concatenatex(filter(Table, [Placement] = earlier( [Placement] ) ),[Product] )

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    jorgeslzr - You can do this like the following:

    All in Promo Column =
      VAR __Period = [PERIOD]
    RETURN
      CONCATENATEX(FILTER('Table',[PERIOD]=__Period),[PRODUCT],",")
    
    All in Placement Column =
      CONCATENATEX(FILTER('Table',[PLACEMENT]=1),[PRODUCT],",")
    
    
    All in Promo Measure =
      VAR __Period = MAX([PERIOD])
    RETURN
      CONCATENATEX(FILTER(ALL('Table'),[PERIOD]=__Period),[PRODUCT],",")
    
    All in Placement Measure =
      CONCATENATEX(FILTER(ALL('Table'),[PLACEMENT]=1),[PRODUCT],",")