eibcga2014
New Member
- Joined
- Sep 7, 2014
- Messages
- 15
I have three tables with the following columns:
BIDDER (fact table for list of bidders - there are only two bidders)
id_bidder (primary key)
bidder_name
STONE (fact table for list of stones - up to 100 stones)
id_stone (primary key)
stone_size
stone_weight
BID (bridge table for list of all bids placed, one from each bidder on each stone)
id_bid (primary key)
id_bidder (foreign key)
id_stone (foreign key)
bid_amount
bid_total=[bid_amount]*RELATED('STONE'[stone_weight])
A collection of diamonds (stones) are each bid on by two bidders. Each stone goes to the highest bidder. This is a many-to-many relationship.
Since each stone has two bids, one from each of the two bidders, and the stone goes to the highest bidder, how do I code this in Power Pivot? I tried using MAXX and FILTER functions, but no luck. I tried to convert each bid into a subset table and then select the max bid of the two bidders of each stone.
I would like to be able to just list in a pivot table the list of stones, with two columns, one for each bidder, which identifies who won the bid for each stone, and what the total amount the winning bidder has to pay.
Any guidance please?
BIDDER (fact table for list of bidders - there are only two bidders)
id_bidder (primary key)
bidder_name
STONE (fact table for list of stones - up to 100 stones)
id_stone (primary key)
stone_size
stone_weight
BID (bridge table for list of all bids placed, one from each bidder on each stone)
id_bid (primary key)
id_bidder (foreign key)
id_stone (foreign key)
bid_amount
bid_total=[bid_amount]*RELATED('STONE'[stone_weight])
A collection of diamonds (stones) are each bid on by two bidders. Each stone goes to the highest bidder. This is a many-to-many relationship.
Since each stone has two bids, one from each of the two bidders, and the stone goes to the highest bidder, how do I code this in Power Pivot? I tried using MAXX and FILTER functions, but no luck. I tried to convert each bid into a subset table and then select the max bid of the two bidders of each stone.
I would like to be able to just list in a pivot table the list of stones, with two columns, one for each bidder, which identifies who won the bid for each stone, and what the total amount the winning bidder has to pay.
Any guidance please?
Last edited: