Forum Discussion
Calculate discount using two tables
HI nh27
Can you share a sample of your data (both tables)?
BTW, try this:
Discount = SUM(Zsales[Subtotal1])*MAX(Discount_Lookup[Discount])
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Thank you so much, this seems to have done the trick! I'm confused as to how MAX has resolved this, would you be kind enough to explain why this worked?
Thanks in advance
- VahidDM4 years agoSuper User
It seems there are many rows for each item in your table and those rows have 2% in the discount column, when you use SUM, it will return the sum of the 2% (if there are 10 rows that will return 20%), but MAX will return just one of them which is 2%.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!