Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Multiple formula in one table

Would like to know how and what's the best approach to create result as per the table below in QV. Any suggestion is much appreciated!

DescriptionAmount
1.Direct Premium AmountFormula 1
2.Assumed Premium AmountFormula 2
3.Licensed Premium AmountFormula 3
Total of 1+2-3Formula 4

The description is basically "hard-coded". While each row is using different formula to calculate.

5 Replies
MVP
MVP

Re: Multiple formula in one table

dimension

valuelist('1.Direct Premium Amount', '2.Assumed Premium Amount')

expression

if(valuelist('1.Direct Premium Amount', '2.Assumed Premium Amount')='1.Direct Premium Amount', formula 1,

if(valuelist('1.Direct Premium Amount', '2.Assumed Premium Amount')='2.Assumed Premium Amount', formula 2

))


add 3 and 4


mov
Esteemed Contributor III

Re: Multiple formula in one table

Another way:

No dimensions, four expressions.  What you have in "Description" is the expression label.  And, check "Horizontal" on the Presentation tab.

Not applicable

Re: Multiple formula in one table

Thanks! It works!

MVP
MVP

Re: Multiple formula in one table

please close this thread (mark useful and correct answer); thanks

Re: Multiple formula in one table

also possible:

Pick(Match(Valuelist(value1,value2,value3),value1,value2,value3), expression1,expression2,expression3)

hope this helps

regards

Marco

Community Browser