Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
prat121
Contributor III
Contributor III

qlik sense

hello everyone I am new to qlik sense, I want to calculate a measure so please help me with it.

I have a field measure name and i would like the sum of value field i.e., sum(value) where the measure is revenue, how can i do this using a if condition.

Labels (1)
4 Replies
Vegar
MVP
MVP

Try this measure

sum({<measure={'revenue'}>}value)

prat121
Contributor III
Contributor III
Author

hello thanku, but this would work in the front end i guess i would like to write a script with various measures in the data load editor.

anat
Master
Master

tab:

load * Inline [
c1,c2,c3
A,5,6
A,2,3
B,8,9

];

NoConcatenate

LOAD if(c1='A',sum(c2)) as c2_sum,c1 Resident tab Group by c1;
drop Table tab;

Vegar
MVP
MVP

Maybe like this?

LOAD 

Id,

Date, 

Measure,

Value,

If(Measure='Revenue', Value) as Revenue

FROM ...