Forum Discussion
Multiply with two discount levels
Hello!
Trust you're doing well!
Please I need your support.
I want to calculate with two discounts levels (like a waterfall) where once applied the first one, of this total I want to apply the second level but I'm not obtaining nothing clear:
Do you know How can I do it?
9 Replies
- lbendlin
Super User
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - godtooro
Helper II
Hi!
Thank you for your support!
Do you know why I cannnot active this type of relation?
- godtooro
Helper II
Dear all,
Take a look at this:
DTO1 was built on this way:DTO1 = SUM('LCV Precio Cliente'[LPADTO1])
For this reason was summing the discounts of the tariffs involved.I've changed DTO1 to the next one:
DTO1 = MIN('LCV Precio Cliente'[LPADTO1])
Now the calculate is correct take a look:
With "SUM":
With MIN:
Now applies the 40% of discount instead of the sum that was 80%.
This is risky because imagine that I've two discounts and the MIN was not the discount to apply.
I must take the discount of the "MIN tariff order" meassure.
Do you think that this formula would be the solution for?DTO1 =CALCULATE(MIN('LCV Precio Cliente'[LPADTO1]), FILTER('LCV Precio Cliente', 'LCV Precio Cliente'[LPADTO1])) - lbendlin
Super User
You have duplicate client codes.
- godtooro
Helper II
Hi!
Thank you again!
Client code is the same: 31026.The key point is that we have two price lists. Where we are taking that with lower order.
This is because our price is 68,07€.68,07€ less 40% = 40,84€
68,07€ less 80% = 13,61€With this formula I think we are solving the problem:
DTO1 =CALCULATE(MIN('LCV Precio Cliente'[LPADTO1]), FILTER('LCV Precio Cliente', 'LCV Precio Cliente'[LPADTO1]))Do you agree?