Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
louise119
Creator III
Creator III

Data calculation

Hi, 
I wanna calculate data A -data B like below.
I wanna get the data C.
Can I do that?

・data A[100,120,200,400,500]
・data B[50]

・data C[50,70,150,350,450]

Thank you.

 

1 Solution

Accepted Solutions
AronC
Partner - Creator II
Partner - Creator II

set vValB=50;

 

tblA:
load * inline [
A
100
120
200
400
500
];

tblA_C:
load 
A - $(vValB) as a_C
resident tblA;


if your value B is in a tbl you could use
let vValB = peek('fieldname',-1,'tblname');

 

 

View solution in original post

2 Replies
AronC
Partner - Creator II
Partner - Creator II

set vValB=50;

 

tblA:
load * inline [
A
100
120
200
400
500
];

tblA_C:
load 
A - $(vValB) as a_C
resident tblA;


if your value B is in a tbl you could use
let vValB = peek('fieldname',-1,'tblname');

 

 

AronC
Partner - Creator II
Partner - Creator II

@louise119   If the answer helped you resolve your issue, please accept it as a Solution.