Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Only and Sum used together

I'm having trouble getting the Sum for the last five months in a line chart.

 

Here is the expression I'm using that is not giving me exactly what I need.

 =only({1<DateDT = {"$(= '>=' & addmonths(Max(EventDTS), -5))"}, Campus = {"Combined"}>} SSENBR)

 

I need to add in a Sum(SSENBR) somewhere and I don't know how to do that with 'only'

 Any suggestions?

Labels (1)
3 Replies
Highlighted
Master II
Master II

Re: Only and Sum used together

replace Only with Sum?

Highlighted
Partner
Partner

Re: Only and Sum used together

When I do that it starts to pull in more than the last five months, which is why I need 'only' or something similar

 

Highlighted

Re: Only and Sum used together

So when you use this

 =Sum({1<DateDT = {"$(= '>=' & addmonths(Max(EventDTS), -5))"}, Campus = {"Combined"}>} SSENBR)

you see data from more than 5 months old... but when you use this

 =only({1<DateDT = {"$(= '>=' & addmonths(Max(EventDTS), -5))"}, Campus = {"Combined"}>} SSENBR)

You see only 5 months of data? Really? Would you be able to share an image with both expressions and may be DateDT as your dimension to show this?