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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors