Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
cancel
Showing results for 
Search instead for 
Did you mean: 
alan920610
Contributor
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
Creator III
Creator III

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