Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
tleivamo
New Contributor III

Re: How to sum range of values

Hi Umar,

No, it isn't. I'm really expecting something like this:

MONTHPEOPLE_INPEOPLE_OUT
MARCH528600

If I select March, the sum should be reflect the total (Jan+Feb+March) in PEOPLE_IN and PEOPLE_OUT

MVP
MVP

Re: How to sum range of values

I believe what you want can be achieved with an AsOf table approach, as described by HIC in the blog post I've posted in my last answer.

It basically creates a new field AsOfMonth, that links each month value to all previous months values, e.g. March to March, February, January. Use this field as dimension in your table chart.

Partner
Partner

Re: How to sum range of values

Have u tried my solution?

That's exactly what's it's giving back

Partner
Partner

Re: How to sum range of values

Capture.PNG

Highlighted
tleivamo
New Contributor III

Re: How to sum range of values

Hi omarbensalem,

It's true, your solution really works, but I don´t want to sum all values from the begining. I mean, I want some like this

The table should show the data in "normal state"

first.png

After, when the filter is apply, it should show the sum of the values from Jan to Month selected:

SECOND.png

Is it possible??

Partner
Partner

Re: How to sum range of values

then change the expression as follow:

if(GetSelectedCount(MONTH)=0,sum(PEOPLE_IN), sum(total {1<NumMonth={"<=$(=max(NumMonth))"}>}PEOPLE_IN))

if(GetSelectedCount(MONTH)=0,sum(PEOPLE_OUT), sum(total {1<NumMonth={"<=$(=max(NumMonth))"}>}PEOPLE_OUT))

Capture.PNG

Capture.PNG

View solution in original post

tleivamo
New Contributor III

Re: How to sum range of values

Hi omarbensalem‌,

It's perfect now!!

Many thanks to you and everybody!!