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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need a help in if condition query....

Dear All,

             I have a issue on below conditon .......

= sum (if(id=5,value) * if(id=10,value))

id = 5 is Qty

id = 10 is Rate

The above condition is showing zero....

Can any one help me...

Regards,

Antony.

39 Replies
sivarajs
Specialist II
Specialist II

sum (if(id=5,value,if(id=10,value)))

Not applicable
Author

Hi Sivaraj,

Thanks for your reply.

                    You conditon is adding both the values. but i want to multiply both the values.

Thanks,

Antony.

its_anandrjs
Champion III
Champion III

Try this

= sum (if(id=5,value) ) * sum( if(id=10,value))

Regards,

Anand

Not applicable
Author

Dear Aanad,

Thanks for your reply.

                             Your condition will not show the total value correctly due to sum of Rate. if i do the sum of rate and sum of Qty separately my total won't match. that is why im doing both the if condtion in one sum function.

Regards,

Napolean.

its_anandrjs
Champion III
Champion III

Can you provide any sample file for this or data file or sample data.

Regards,

Anand

Anonymous
Not applicable
Author

Hi..

num(sum(if(id=5, value))) * num(sum(if(id=10,value)))

regards,

Akbar

Not applicable
Author

Dear All,

              Please find below the eg.

Product codeIdValue
1105
21010
31015
41020
51025
155
254
353
457
558

Sales = Rate (10)* Qty (5)

Sales Value i need 450

Regards,

Antony

Anonymous
Not applicable
Author

Hi..

Let's try this :

sum(if(id=10, value)) * sum(if(id=5, value))

Regards,

Akbar

its_anandrjs
Champion III
Champion III

Sales = Rate (10)* Qty (5)

This columns Rate and Qty not in your eg please explain it.

Regards,

Anand