# Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
New Contributor II

## Multiply Field values with pre-defined values.

Hi Qlikers,

I am new to Qlik environment . I want to know logic for this scenario -

I have got Column as Decision Points and Year -

 Decision Points Year PR1 46 PR2 37 PR3 98 PR4 64 PR5 88 PR6 46 PR7 89 PR8 32

I want to now multiply pre defined numbers for the values in Decision Point column, like - all the values of Year column should be multiplied as -

If it is PR1 then 46(value in Year column ) * 16.05%(pre defined value).

If it is PR2 then 37(value in Year column ) * 7.80%(pre defined value).

If it is PR3 then 98(value in Year column ) * 10.13%(pre defined value).

If it is PR4 then 64(value in Year column ) * 11.14%(pre defined value).

If it is PR5 then 88(value in Year column ) * 10.11%(pre defined value).

If it is PR6 then 32(value in Year column ) * 25.38%(pre defined value).

If it is PR7 then 89(value in Year column ) * 10.88%(pre defined value).

If it is PR8 then 46(value in Year column ) * 8.32%(pre defined value).

Note : Pre-Defined values will be same as defined above for PR1 to PR8. Only values  in years column will change.

can some one help me which this logic here please ?

Please let me know if you need additional requirements.

I am new to Qlik Sense Environment, Kindly let me know where and how i should use this logic.

LP27

Labels (4)

• ### sunny_talwar

1 Solution

Accepted Solutions
MVP

## Re: Multiply Field values with pre-defined values.

Try this

``Sum(Aggr(Sum([Planned Time]) * Pick(Match([Decision Point], 'PR1', 'PR2', 'PR3', 'PR4', 'PR5', 'PR6', 'PR7', 'PR8'),  0.1605, 0.0780, 0.1013, 0.1114, 0.1011, 0.2538, 0.1088, 0.0832), [Decision Point]))``

Your dimension name was Decision Point, but we were using Decision Points (with an extra 's' at the end)

12 Replies
MVP

## Re: Multiply Field values with pre-defined values.

May be this kind of expression

``Sum(Aggr(Year * Pick(Match([Decision Points], 'PR1', 'PR2', 'PR3', 'PR4', 'PR5', 'PR6', 'PR7', 'PR8'),  0.1605, 0.0780, 0.1013, 0.1114, 0.1011, 0.2538, 0.1088, 0.0832), [Decision Points]))``
New Contributor II

## Re: Multiply Field values with pre-defined values.

This expression produces 0 results for every selection made.
MVP

## Re: Multiply Field values with pre-defined values.

Can you show an image or a sample so that we can see the issue

New Contributor II

## Re: Multiply Field values with pre-defined values.

I have attached image.

the expression produces 0 as results for all PR1 - PR8.

MVP

## Re: Multiply Field values with pre-defined values.

Do you have more than a single value of Year for each Decision Points? or do you have a single value only? If you have more than 1... would you want to add them up for the purpose of the calculation?

New Contributor II

## Re: Multiply Field values with pre-defined values.

Yes there are more than single value for year and would want to add them all for calculation purpose too.

MVP

## Re: Multiply Field values with pre-defined values.

Try this by adding Sum() around Year

``Sum(Aggr(Sum(Year) * Pick(Match([Decision Points], 'PR1', 'PR2', 'PR3', 'PR4', 'PR5', 'PR6', 'PR7', 'PR8'),  0.1605, 0.0780, 0.1013, 0.1114, 0.1011, 0.2538, 0.1088, 0.0832), [Decision Points]))``

New Contributor II

## Re: Multiply Field values with pre-defined values.

Still it produces same results as before.

It show 0 for all the values.

MVP