Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, can you help me pls.
I can't find anything in this area
Еhere are 2 tables without any relationship.
I need to put the price from the first table to the second if Shop and Prod_Id matched.
But the problem is - that at the pricing table, we have different dates. and the date from the second table - should be >= maximum date - from the first.
Thank you in advance.
Solved! Go to Solution.
Hi, @Anonymous
“LOOKUPVALUE” function is not the right direction here. We can use a measure as below to work on it.
Price =
VAR maxdate =
CALCULATE (
MAX ( Price[Date(when start work with this price)] ),
FILTER (
Price,
Price[Shop] = Customer[Shop]
&& Price[Prod_id] = Customer[Prod_id]
&& Price[Date(when start work with this price)] < Customer[Date]
)
)
RETURN
CALCULATE (
MAX ( Price[Price] ),
FILTER (
Price,
Price[Date(when start work with this price)] = maxdate
&& Price[Shop] = Customer[Shop]
&& Price[Prod_id] = Customer[Prod_id]
)
)
Here’s a sample I made:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
“LOOKUPVALUE” function is not the right direction here. We can use a measure as below to work on it.
Price =
VAR maxdate =
CALCULATE (
MAX ( Price[Date(when start work with this price)] ),
FILTER (
Price,
Price[Shop] = Customer[Shop]
&& Price[Prod_id] = Customer[Prod_id]
&& Price[Date(when start work with this price)] < Customer[Date]
)
)
RETURN
CALCULATE (
MAX ( Price[Price] ),
FILTER (
Price,
Price[Date(when start work with this price)] = maxdate
&& Price[Shop] = Customer[Shop]
&& Price[Prod_id] = Customer[Prod_id]
)
)
Here’s a sample I made:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
93 | |
83 | |
70 | |
65 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |