Forum Discussion
Anonymous
8 years agoNot applicable
How to get value from another table based on multiple criteria
Hello, I'm in stuck with my problem. Let's say I have 2 tables: Quotations and Shipments: Quotations table: Branch Department QuoteID Local Client SrvLevel Origin Destination Start...
Anonymous
8 years agoNot applicable
Hello ChrisMendoza,
Trying to follow your guideline but below error occurs:
what am I doing wrong?
Thanks, Tomas
ChrisMendoza
8 years agoResident Rockstar
Anonymous,
Seems like you do not have a relationship between the two tables. When I loaded your sample tables, Power BI established the relationship as the below for me:
Is your's not similar?
For Reference RELATED ( )
- Anonymous8 years agoNot applicable
Hi ChrisMendoza,
Relation is working if LocalClient is unique but if I add another Quotation for the same client but different Start and Expiry dates (very last row in below table) then relations dissapearring and your formula is not working.
BranchDepartmentQuoteIDLocal ClientSrvLevelOriginDestinationStart DateExpiry Date
BR2 241 QMT200002851 Customer1 LIF NLRTM DEBRV 2018.06.02 2018.06.30 BR2 241 QMT200002852 Customer2 FIL NLRTM DEBRV 2018.06.02 2018.06.15 BR2 241 QMT200002853 Customer4 LIL KRPUS DEBRV 2018.06.02 2018.06.30 BR2 241 QMT200002854 Customer5 LID KRPUS DEBRV 2018.06.02 2018.06.30 BR2 241 QMT200002855 Customer7 LIF DEHAM DEBRV 2018.06.02 2018.06.30 BR2 241 QMT200002856 Customer8 LIF DEHAM DEBRV 2018.06.02 2018.06.30 BR2 241 QMT200002857 Customer9 LID CNSHA DEBRV 2018.06.03 2018.06.15 BR2 241 QMT200002858 Customer10 LIF DEHAM DEBRV 2018.06.01 2018.06.30 BR2 241 QMT200002859 Customer10 LIF DEHAM DEBRV 2018.07.01 2018.07.31 Any thoughts how to solve such case?
Thanks in advance!