Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sushil353
Master II
Master II

how to get last 2 year rolling store count in table

Hi All,

I need to calculate count of stores for each year which opened in last to last year.

My input data is

Test:

Load * inline

[

Storeid,YearofOpen

1,2010

2,2010

3,2011

4,2011

5,2012

6,2013

7,2013

8,2014

9,2015

];

desired output:

YearStore Count
20100
20110
20122
20134
20145
20157

It seems the logic is simple but I am not getting any clue to get it solved.

Please help to get the logic solved.

Thanks in advance

Sushil

1 Solution

Accepted Solutions
Anonymous
Not applicable

Yes, it is simple, see attached.

The expression is

rangesum(above(count(distinct Storeid),2, rowno()))

View solution in original post

2 Replies
Anonymous
Not applicable

Yes, it is simple, see attached.

The expression is

rangesum(above(count(distinct Storeid),2, rowno()))

Not applicable

Hi!

Try This:

Create a new table Chart

Define as Dimension: Storeid

Define one expresion as: Count( Distinct(Storeid))

Let me know If works!

Cheers!