Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
wsspglobal
Helper I
Helper I

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!!

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@wsspglobal 
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.

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@wsspglobal 
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.

az38
Community Champion
Community Champion

Hi @wsspglobal 

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())

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.