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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count ids with Date dimension and expressions

Hello Community

I´m new to QlikView and i´m facing a Problem.

in SQL i have something like that:

SELECT COUNT(id) FROM Table s where s.startDate <= "2014-10-31" and (s.endDate >= 2014-10-01 or s.endDate is NULL)

In QlikView i tried something like that in expression:

count({<startDate ={"<=$(=MonthEnd)"},endDate={"NULL",">=$(=MonthStart)"}>}id)

Where "MonthStart" and "MonthEnd" are fields from a connected Calendar

When i filter by a special Date i get the right value for this Month. I get all values from the Table where startDate is less then the chosen Date(MonthStart) and endDate is higher than the chosen Date(MonthEnd)

I want to show a Chart with Dimension "Month".

for Oct  MonthsEnd = "2014-10-31" and MonthStart = "2014-10-01"

for Sep MonthsEnd = "2014-09-31" and MonthStart = "2014-09-01"

But what it does right now is when i make a full accumulation, for every dimension (oct, sep, aug...) it allways uses MonthsEnd = "2014-10-31" and MonthStart = "2014-10-01".

Please can somebody help me to achieve this problem.

Steve

11 Replies
anbu1984
Master III
Master III

Can't you use Month field as dimension Or Am i missing something?

Not applicable
Author

The Problem is, when i user Month as Dimension only the latestMonth will be right.

In the Sreenshot you can see that in Month Oct MonthStart and MonthEnd are the Dates from November but it should be 31.10.2014 and 01.10.2014.

and because of that all the counts for the months are wrong exept the latest month.

subscriptionCount_withDimension.jpg