Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
jgodemi2
New Contributor

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
Partner
Partner

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

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.