Forum Discussion
Relationships pulling incorrectly
Hello, I am working with two tables.
One table is sales. It contains the product, customer, purchase date, and Pricing Record. Some of the pricing records are 0.
The other table is a lookup table. It is the Pricing Record table. It has pricing records that are valid for certain dates. There can be a dozen records for the same product.
The tables are connected via Pricing Record.
Some pull in correctly, but some pull the wrong ones over. I need to tell power bi that if the purchase date is between the pricing record dates, and the customer and product are the same, use that record for reference.
Any help is appreciated. Thank you!
Anonymous , You can write a column in the sales table
the example
Maxx(filter(Price, Price[customer] = sales[customer] && Price[Item] = sales[Item] && Price[Strat Date]<= Sales[Date] && Price[End Date] >= Sales[Date] ), Price[Price])
2 Replies
- amitchandakSuper User
Anonymous , You can write a column in the sales table
the example
Maxx(filter(Price, Price[customer] = sales[customer] && Price[Item] = sales[Item] && Price[Strat Date]<= Sales[Date] && Price[End Date] >= Sales[Date] ), Price[Price])
- AnonymousNot applicable
Hey, it seems a bridge table could solve the issue, but would love to see some sample data, ty.