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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

Current Year store count

Hi All,

I have a field Store_Open_Date and I wan to do the count of Stores which has opened in the current year.

Regards

Ren

1 Solution

Accepted Solutions
nilesh_gangurde
Partner - Specialist
Partner - Specialist

Create a Master calender which will have following fields:

Day,

Month,

Year,

MonthYear

and then Create the table having dimension and expression as you want

and make selection in the year field for which you want to get the count.

in this case Expression will be : Count(Distinct Stores)

OR

You can hardcore the chart by using the following  expression in the chart.

Count ( {<Store_Open_Date = {"=Year(today())"}> } Distinct Stores)

View solution in original post

6 Replies
Not applicable

Hi,

For example

You could get the Year from your Store_Open_Date field and name it as Store_Open_Year. Use the Store_Open_Year in your set analysis that looks like this.

count({<Store_Open_Year = {$(=max(Store_Open_Year))} >} Distinct Stores) .

Regards,

Janzen

nilesh_gangurde
Partner - Specialist
Partner - Specialist

Create a Master calender which will have following fields:

Day,

Month,

Year,

MonthYear

and then Create the table having dimension and expression as you want

and make selection in the year field for which you want to get the count.

in this case Expression will be : Count(Distinct Stores)

OR

You can hardcore the chart by using the following  expression in the chart.

Count ( {<Store_Open_Date = {"=Year(today())"}> } Distinct Stores)

renjithpl
Specialist
Specialist
Author

  I tried as suggested it works,

count({<DIM_STORE_OPEN_YEAR = {$(=year(today()))} >} Distinct DIM_STORE_SHORTNAME) 

now i want only these store names in a list box

Not applicable

Hi,

If Mr. Nilesh's answer works, you should tag it as right answer.

now, for your NEW question about how to create a listbox with only those brances, you could try this.

aggr(only({<DIM_STORE_OPEN_YEAR = {$(=year(today()))} >} DIM_STORE_SHORTNAME),DIM_STORE_SHORTNAME)

Regards,

Alex

renjithpl
Specialist
Specialist
Author

Thanks a lot, i forgot to use "Only".

nilesh_gangurde
Partner - Specialist
Partner - Specialist

Thanks Alexis Tan,renjithpl

Regards,

Nilesh Gangurde