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: 
GraceGao
Creator
Creator

Set analysis expression

Hi Experts,

i would like to calculate amount as below ,however, no result. Can it be realized? Please help. 

sum({condition A} Quantity *avg({condition B} price))

I want to Quantity * avg (price) and get sum amount.  if i write as below the result is not expected.

sum({condition A } Quantity)*avg({condition B})

2 Replies
lorenzoconforti
Specialist II
Specialist II

Try this

 

sum({condition A} Quantity * $(=avg({condition B} price))  )

dplr-rn
Partner - Master III
Partner - Master III

agree with lorenzo.

i would put the avg expression in a variable  so that its calculated globally