Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonnenberg91
Contributor
Contributor

select a specific cell to calculate a new field

Hi I am new to Qlik and currently trying how to transform data tables.

I am trying to calcualte a percentage of users that do a specific task devided by the number of users that started a session. 

The table is as follows

|event name| active users|

task 1 | 50|

taks 2| 30|

task n|  ...|

session start| 100|

 

Now I want to create a new field and calculate the percentage of users that did a task by the number of users that started a session.

= task1/$session_start$.

I do not lnow how to select a specific cell to do this calculation.

Can someone please help me here? This seems so basic but there is nothing in forums or elsewhere I can find.

 

Labels (4)
2 Replies
Chanty4u
MVP
MVP

Try this

Main:

LOAD 

    [event name],

    [active users]

FROM [source];

Main1;

LOAD 

    *,

    [active users] / Peek('active users') as Percentage

RESIDENT Main

WHERE [event name] <> 'session start';

Sonnenberg91
Contributor
Contributor
Author

Thank you for the suggestion.

Does peek use the highes number? I want to be able to pick any cell I want to do a calculuation. 

Currently I add a calucated field when doing a report. Is this the right way? You seem to use a script here.