Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to get new stores in new city

Hi Experts,

I have a data set from which I need to get the no of new stores in new city for a fiscal year..

below is the sample data set.

StoreCityStore open dateCity Enter Datefiscal yearsales
1Delhi4/26/20104/26/2010

2010-2011

100
10Delhi5/14/20114/26/20102011-2012150
2Mumbai10/23/201110/23/20112011-2012200
3Mumbai11/22/201110/23/20112011-2012230
30Mumbai12/23/201210/23/20112012-2013100
4Chennai10/15/201110/15/20112011-2012123

and I want output for no of new stores in new city for a fiscal year

so the expected output would be:

Fiscal Year# of new stores in new city
2010-20111
2011-20123
2012-20130

could any body please help me out to get it resolved.

Thanks in Advance.

Aashish

17 Replies
Anonymous
Not applicable
Author

Any idea how to get this??

sujeetsingh
Master III
Master III

You can get this through FirstSorted value function in the onject with aggrg function.

Folow the link

WHat is the FirstSortedValue()

sujeetsingh
Master III
Master III

One more thing is that how you are going to calculate that which opened one is latest or new.

Anonymous
Not applicable
Author

Hi Surjeet,

Thanks for your reply,

based on the first open date is the criterion to get the fiscal year of opening a city or store...

Here In above example for fiscal year 2012-2013 we should get the zero value because Mumbai city has opened in 2011-2012...

also, I am not able to get.. how we can use firstsortedvalue() function to count the no new stores in new city..

could you please give me some idea to write the expression

sujeetsingh
Master III
Master III

Sharma,

I am confused cam you please explain that how are you calculating the new stores here.

ashwanin
Specialist
Specialist

Hi Sharma,

I think you have to do the below,

1: you have to create a new field(year e.g named it Enteryear) from City Enter Date .

2: From Fiscal year field you have to took Fiscalfirstyear.

3: Then you have to calculate the count of stores with condition : if (Enteryear > Fiscalfirstyear  (count (Stores))

MayilVahanan

HI

For 2010-2011, Delhi - 4/26/2010

For 2011-2012, Mumbai and Chennai only know.

Could you please explain

For 2011-2012, how you are saying 3 as new stores?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Hi Surjeet,

Based on the store open date we can find out the new store opened in a fiscal year.

But I need to calculate the no of store based on the condition...

that is >>.  the new store should be from new city...

the new city we can get from city enter date for a fiscal year..

Anonymous
Not applicable
Author

hi Mayil,

for 2011-2012

one store is from chennai

and two store (2,3) are from Mumbai.. since these two are opened in 2011-2012