Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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