Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Detect new item in same column

Hi,

 

I have a table like this, and I want to identify the new item that Shopper1 got compared to Monday. What would the formula look like in 'New Item' (Column D)?

ShopperDayItemNew Item
Shopper1MondayApple 
Shopper1MondayBanana 
Shopper1MondayOrange 
Shopper1TuesdayOrange 
Shopper1TuesdayApple 
Shopper1TuesdayBanana 
Shopper1TuesdayLimeNew Item

 

Thanks!!

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Anonymous 
    You can set the variable to any days

     

    New column = 
    Var Monday_= CALCULATETABLE(VALUES('Table'[Item]),'Table'[Day]="Monday")
    Var Tuesday_= CALCULATETABLE(VALUES('Table'[Item]),'Table'[Day]="Tuesday")
    return IF(Tuesday_ in Monday_,BLANK(),[Item])

     

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

2 Replies

  • az38's avatar
    az38
    Community Champion

    Hi Anonymous 

    you can try LOOKUPVALUE() column like

    New Item = 
    var _inMonday = LOOKUPVALUE('Table'[Shopper],'Table'[Shopper],[Shopper],'Table'[Item],[Item],'Table'[Day],"Monday")
    RETURN
    if(ISBLANK(_inMonday),"New Item",BLANK())
  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 
    You can set the variable to any days

     

    New column = 
    Var Monday_= CALCULATETABLE(VALUES('Table'[Item]),'Table'[Day]="Monday")
    Var Tuesday_= CALCULATETABLE(VALUES('Table'[Item]),'Table'[Day]="Tuesday")
    return IF(Tuesday_ in Monday_,BLANK(),[Item])

     

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