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

How to make a selective SUM (multiple columns) for a chart

Hello everyone!

Thank you for seeing my question, it´s probably very basic and silly question, but I just dont know how to do this

I have a table similar to this one:

Captura de pantalla 2018-10-11 a la(s) 10.02.49.png

I want to make a bar chart for Stock=A but only for months 2 and 3.

I usually would be using:

Dimension:

=Month

Measures:

Sum({<Stock={'A'}>}USD)

But that would include months 1, 2 and 3

How do I select just 2 and 3?

THANKS!!!

3 Replies
sunny_talwar

Try this

Sum({<Stock = {'A'}, Month = {'2', '3'}>} USD)

felipedl
Partner - Specialist III
Partner - Specialist III

HI Alejandro,

You can change you set from:

Sum({<Stock={'A'}>}USD)


to


Sum({<Stock={'A'},Month={2,3}>}USD) if you want a static view or


Sum({<Stock={'A'},Month={">=$(Max(Month)-1)"}>}USD)


cchristenson2
Contributor III
Contributor III

Try this,

Sum({<Stock={'A'}, Month = {' *insert months you want* '} >}USD)



For Example:

Sum({<Stock={'A'}, Month = {'2','3'} >}USD)