Forum Discussion
nh27
4 years agoHelper III
Calculate discount using two tables
Hi fellow BI users, I need your help! I am trying to create a measure called Discount which takes the discount value from a table "Discount_Lookup" and applies it to the row in "ZSALES" table....
nh27
4 years agoHelper III
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
VahidDM
4 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!!