Forum Discussion
Fill table based on information according to date.
- 3 years ago
Hello Anonymous,
Supplier = VAR CurrentDate = Orders[Date] VAR Material = Orders[Material] RETURN CALCULATE( FIRSTNONBLANK(Suppliers[Supplier], 1), Suppliers[Supplies] = Material, Suppliers[ContractDateLimit] >= CurrentDate )This formula uses a combination of the CALCULATE, FIRSTNONBLANK, and VAR functions to create a new column called "Supplier" in the Orders table. It looks up the supplier that supplies the material for each order and that has an active contract as of the order date.
Let me know if you might need further assistance.
Anonymous ,
Can you explain by what logic are you relating Product with Supplier?
I'm sorry but I don't understand your question... Do you want to know what is the relationship between these two tables?
The problem starts there and goes all the way to what I've said. I've tried to relate the material with supplies, but I don't think that makes a lot of sense.
I didn't give that information because, I have no clue on what relationship should there be in this type of situations.