Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hot to get the full accumulation when selection a field

Hey,

I have following problem. I build a table with an accumulation expression which works fin but when I click on a date field the table gives back not the "full" accumulation value. I want when I click on a date that Qlik gives back the total accumultion from start until the date which I have choose. Please look at my file.

Thanks...

PS: When I click in my example the date 4.2.2015 there must be 1 and not - 3.

1 Solution

Accepted Solutions
sunny_talwar

Check it out:

Capture.PNG

Expression: If(Count(ID) > 0, RangeSum(Above(Count({$<Event = {I}, Date, monthDate>} ID) - Count({$< Event = {O}, Date, monthDate>} ID), 0, RowNo())))

View solution in original post

7 Replies
marcus_sommer

With 1 instead of $ as set identifier, like:

RangeSum(Above(count({1< Event = {I}>} ID) - count({1< Event = {O}>} ID),0,rowno()))

- Marcus

Kushal_Chawda

=if(GetSelectedCount(Date)>=1,

aggr(count(TOTAL {$< Event = {'I'},Date={"<=$(=max(Date))"}>} ID) - count(total {$< Event = {'O'},Date={"<=$(=max(Date))"}>} ID),Date),

RangeSum(Above(count({$< Event = {I}>} ID) - count({$< Event = {O}>} ID),0,rowno())))

see the attached

sunny_talwar

This should also work:

If(Count(ID) > 0, RangeSum(Above(Count({$<Event = {I}, Date>} ID) - Count({$< Event = {O}, Date>} ID), 0, RowNo())))


Capture.PNG

sunny_talwar

Comparison of the three expressions provided by Marcus, Kush and me

Capture.PNG

Here

Expression 2 = Marcus

Expression 3 = Kush

Expression 1 = Mine

Based on your requirement you can choose one of the expressions.

Best,

Sunny

Not applicable
Author

What I must change my goal is to make the selection based on monthDate?

sunny_talwar

Check it out:

Capture.PNG

Expression: If(Count(ID) > 0, RangeSum(Above(Count({$<Event = {I}, Date, monthDate>} ID) - Count({$< Event = {O}, Date, monthDate>} ID), 0, RowNo())))

Not applicable
Author

Oh I have the solution ! Thank you...