# Alteryx designer Discussions

SOLVED

## Calculations

Highlighted
8 - Asteroid

Dear all,

I have attached an excel file which contains of 12 dishes and the total, I have calculated the total by multiplying the quantity of each dish by its price. But I have one problem, dish 12 its price change. So, if the customer ordered only dish 12 the price is 210 and if the customer ordered any dish with dish 12 the price of dish 12 will be 157.5. What I should edit in the formula to achieve this condition?

Highlighted
Alteryx Certified Partner

Hi @Feras95p, I took some liberty in assuming the structure of your data and created a sample workflow. Assuming this is how you have it structured, give it a try on your actual dataset. Let us know if you run into a challenge with it.

Highlighted 14 - Magnetar

@Feras95p I would just make a small change to your formula. Instead of only multiplying by 210 all the time, you will want to use an if statement to first check if all of the other dishes are 0 and if so, then use 210. If any of the other fields have a value other than 0, use 157.5. Something sort of like:

``iif([Dish4]=0 and [Dish5]=0, 210, 157.5)``

(but using all of your other fields)

Labels