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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Setting a value in a new column for a groups of rows with an unique name (Lookup)

Hi all,

I am trying to create a lovely formula in a Column which sets the value of that column to Y Won or Y lost based on an if Function.

IF(SEARCH("Y",bid[Competitor naam],,0) && bid[Won/Lost]="Won", "Y Won", "Y Lost").

Now this is working perfectly for putting the value for Competitor Y. But lets say XYZ did a bid for a tender1 and Y wins. It will set the value for X and Z to Y Lost. And I would want them to also have the value Y wins. If have been spending a lot of time chaging this formula but everytime I dont get the right one. So I would love to know how to 'group' the tenders and then apply the values set in the IF statement. Thanks a million for your help.

TenderCompetitorBid Won/LostWanted Result
Tender 1XLostY won
Tender 1YWonY won
Tender 1ZLostY won
Tender 2XWonY lost
Tender 2YLostY lost
Tender 2ZLostY lost
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

If there can only ever be 1 winner for a tender then you could use

Who Won = 
var currentTender = 'Table'[Tender]
return LOOKUPVALUE( 'Table'[Competitor], 'Table'[Tender], currentTender, 
   'Table'[Bid won/lost], "Won") & " won"

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

If there can only ever be 1 winner for a tender then you could use

Who Won = 
var currentTender = 'Table'[Tender]
return LOOKUPVALUE( 'Table'[Competitor], 'Table'[Tender], currentTender, 
   'Table'[Bid won/lost], "Won") & " won"
Anonymous
Not applicable

Thanks a million... I created a new column with this formula and adjusted the above formula and referenced to the new column. Great!

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors