I have a Discounts table, with the date, catalog id, and discount fields; the discount must be applied until the date indicated in the table. In the sales table, I need that when I select the catalog id, look in the discount table if it has a discount and place it in the DISCOUNT field. I used this expression but it doesnโt work for me:
if (TODAY () <= LOOKUP ([CATALOG ID] = [_ THISROW]. [CATALOG ID], Discounts, DISCOUNT ID, DATE), LOOKUP (MAXROW (โDiscountsโ, โDATEโ, [CATALOG ID] = [_ THISROW ]. [CATALOG ID]), โDiscountsโ, โDISCOUNT IDโ, โDISCOUNTโ), 0)
THANKS FOR THE SUPPORT
Solved! Go to Solution.
Youโre right Steve, thank you very much.
Youโre using LOOKUP() wrong.
Youโre right Steve, thank you very much.
User | Count |
---|---|
41 | |
29 | |
22 | |
20 | |
15 |