Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save $300 - Register for QlikWorld (formerly Qonnections) by January 31st: Learn More
alejnadro
New 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

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

Try this

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

Partner
Partner

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

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
New Contributor III

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

Try this,

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



For Example:

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