Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to do a if statement and sum the numbers in a certain column where fieldname=something?

Using a bar chart. If Company = “yahoo” then sum the numbers in values column where type=Search into one bar and sum the numbers in values column where type=Others in another bar. And where do I write the statement? in the (type) dimension or (value) measure?

Capture3.PNG

Below pic is what I wanna achieve.

IMG_20180717_140056.jpg

Below is what I have....whatever values that belong to google is also displayed but i do not want that.

yahooqilksense.PNG

Message was edited by: Yong Jie, Jordan Yong

Message was edited by: Yong Jie, Jordan Yong

Message was edited by: Yong Jie, Jordan Yong

Message was edited by: Yong Jie, Jordan Yong

Message was edited by: Yong Jie, Jordan Yong

Message was edited by: Yong Jie, Jordan Yong

1 Reply
felipedl
Partner - Specialist III
Partner - Specialist III

Hi Yong, use set analysis for it on your expression:

Say you want to show the values for yahoo do:

sum({<Company={"yahoo"}>}Value)

will display only the values for yahoo even if you filter "google" eventually.