# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for
Did you mean:
Contributor III

## Expressions Issue

Hi,

Im trying to create a expression that states the following

If the listprice divided by the salesprice is more or equal to 112.5 %  then the amount above should be mutilplide by 1.30 if not then multipled by 1.0

ive started but got stucked pretty fast.

If(((Sum(lägstapris)/Sum(Försäljningspris))<=('1,125')), * '1.30' )

Im kinda in a stress in this matter.

/André

13 Replies
MVP

Try this:

If((Sum(lägstapris)/Sum(Försäljningspris))>=1.125,Sum(lägstapris)/Sum(Försäljningspris)) * 1.30,Sum(lägstapris)/Sum(Försäljningspris))

You do not need to multiply by 1 as will give you the same result.

Master II

Hi Andre,

Is it what you are looking for?

IF((LP/SP)>='112.5%',((LP/SP)-1125)*1.30,(1125-(LP/SP))*1.0)

Regards

KC

Best Regards,
KC
Specialist III

Hi

Try this:

If(Num((Sum(lägstapris)/Sum(Försäljningspris)),'#,##0%')<='112.50%',(Sum(lägstapris)/Sum(Försäljningspris))*1.30,

(Sum(lägstapris)/Sum(Försäljningspris))*1.0)

Hope that works

Regards

Av7eN

Not applicable

Hi,

=if((sum(listprice)/sum(salesprice))>=112.5,(sum(listprice)/sum(salesprice))*1.30,(sum(listprice)/sum(salesprice))*1.0)

Hi,

Try

If((Sum(lägstapris)/Sum(Försäljningspris))>=1.125,

(Sum(lägstapris)/Sum(Försäljningspris))*1.30,

(Sum(lägstapris)/Sum(Försäljningspris))

)

regards

Great dreamer's dreams never fulfilled, they are always transcended.
Master II

I think I took your statement  " amount above " in wrong sense.

IF(sum(LP)/sum(SP)>='112.5%',sum(LP)/sum(SP)*1.30,sum(LP)/sum(SP))

Regards

KC

Best Regards,
KC
Not applicable

Hi,

What do you mean by "amount above"? I am assuming it as sum(ListPrice)/sum(SalesPrice).

Could you please try using it:

if(

(sum(ListPrice)/sum(SalesPrice))*100 >=112.5,
(sum(ListPrice)/sum(SalesPrice))*1.3,

(sum(ListPrice)/sum(SalesPrice))

)

Master II

lägstapris * (If(lägstapris/Försäljningspris <=1.125)), 1.30, 1))

should do (please check decimal-symbol to be either "." or ",".

HTH Peter

Contributor III
Author

Hi,

Thx for fast response, im gonna try the above, just to clearify, its only the amount above 1,125 that should be multiplied, so the expression should give the result,

lets for say that the salesprice is 50000 the list price is (100%)40000 then the first (112,5 %) 45000 should be multiplied with 1.0 the rest (12,5 %) 5000 should be multiplied by 1.30 giving a result of 51500.

so the extra gain for the salemans bonus is 1500 since he sold the kitchen 25% above list price.

Hope this sorted some of the thoughts