Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
alan920610
New Contributor

In Qlik Sense, how to create a measure with conditions?

Hi,

I am new to Qlik Sense and have trouble creating calculated fields.

My data only contains two columns, and I want to create a third column for future sales by Amount*Probabilty:

 

AmountStage
4316Explore
1522Begin
3081Middle
1566Middle
4600Develop
1171Product
5123Sell

Conversion probability

Explore = 0.1

Begin=0.2

Middle=0.3

Develop=0.4

Product=0.8

Sell=0.1

For example, the future sales for the first row would be 4316*0.1=431.6

Can anyone help me with this problem? Thanks in advance.

1 Reply
kenphamvn
Contributor III

Re: In Qlik Sense, how to create a measure with conditions?

Hi 

Try this

Create a Measure

Sum(Amount *

pick(match(Stage, 'Explore ', 'Begin', 'Middle','Develop','Product','Sell')

, 0.1,0.2,0.3,0.4,0.8,0.1)

)

 

But the best way, you can create a new column in load script

 

Load *

,pick(match(Stage, 'Explore ', 'Begin', 'Middle','Develop','Product','Sell'), 0.1,0.2,0.3,0.4,0.8,0.1)  as Probability
from table_name;

then create a measure like Sum(Amount*Probability)

 

regards 

An Pham