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: 
curiousfellow
Specialist
Specialist

counting where date < calculated date

I have a dimension called yearsubcribe.

In a listbox I select a date (date_sel).

Now I want to count clients who subcribed before month and day of date selected .

It it possible that clients subcribe in year before year of subcription.(so daynumber of year won't work)

So I constructed this expression:

count ( distinct {< date_subcription ={"<=  date(date(date_sel,'DD')&'-' & date(date_sel,'MM')& '-' & text(yearsubcribe),'DD-MM-YYYY')"}>} clientid)

Is it not possible to use a dimension value in this expression or

do i make another mistake ?

1 Solution

Accepted Solutions
andrey_krylov
Specialist
Specialist

Try this

count ( distinct {< date_subcription ={"$(='<=' &  date(date(date_sel,'DD')&'-' & date(date_sel,'MM')& '-' & text(yearsubcribe),'DD-MM-YYYY'))"}>} clientid)

View solution in original post

3 Replies
andrey_krylov
Specialist
Specialist

Try this

count ( distinct {< date_subcription ={"$(='<=' &  date(date(date_sel,'DD')&'-' & date(date_sel,'MM')& '-' & text(yearsubcribe),'DD-MM-YYYY'))"}>} clientid)

curiousfellow
Specialist
Specialist
Author

Seems to work, Thnx

Is missed a bracket, but besides and went wrong with this piece ={"$(='<='

andrey_krylov
Specialist
Specialist

Just syntax error)