Forum Discussion

jorgeslzr's avatar
jorgeslzr
Frequent Visitor
6 years ago
Solved

table to list into column

Hello, I have a table about my products, its promos, and its location. As you can see on the table below, some promos dont have a placement and some products have a placement but no promo.   [Prod...
  • Fowmy's avatar
    Fowmy
    6 years ago

    @jorgeslzr

    Column for Promo:

    Promo Col = 
    
    VAR PROMO = 
        CALCULATETABLE(VALUES(Table6[PRODUCT]),
            Table6[PROMO TITLE] = EARLIER(Table6[PROMO TITLE]),
            ALL(Table6)
        )
    RETURN
    
    IF( OR(Table6[PROMO TITLE]="", COUNTROWS(PROMO)<2),BLANK(),
        CONCATENATEX(
        PROMO, Table6[PRODUCT], "|"
        )
    )

    Column for placement

    Place Col = 
    
    VAR PROMO = 
        CALCULATETABLE(VALUES(Table6[PRODUCT]),
            Table6[PLACEMENT] = EARLIER(Table6[PLACEMENT]),
            ALL(Table6)
        )
    RETURN
    
    IF( OR(Table6[PLACEMENT]=0, COUNTROWS(PROMO)<2),BLANK(),
        CONCATENATEX(
        PROMO, Table6[PRODUCT], "|"
        )
    )

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube Linkedin