Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis expression shouldnt change when selecting monthyear

Hello

I have this expression:

=count({1<DimRaptorCustomer.CustomerID={'$(vCustomer)'},Date_CleanDato={">=$(=Date(Min(Date_CleanDato))) <= $(=Date(Max(Date_CleanDato)))", MonthYear=}>} DateKey)

It is supposed to count all dates where i have data.

*But when i select monthYear in listbox. It only count the month i choose. It should not do so! It should act like i have nothing selected

1 Solution

Accepted Solutions
somenathroy
Creator III
Creator III

use below exp:

=count({1<DimRaptorCustomer.CustomerID={'$(vCustomer)'},

Date_CleanDato={">=$(=Date(Min({1< MonthYear>}Date_CleanDato)))

<= $(=Date(Max({1< MonthYear>}Date_CleanDato)))", MonthYear=}>} DateKey)


Regards,

som

View solution in original post

3 Replies
somenathroy
Creator III
Creator III

use below exp:

=count({1<DimRaptorCustomer.CustomerID={'$(vCustomer)'},

Date_CleanDato={">=$(=Date(Min({1< MonthYear>}Date_CleanDato)))

<= $(=Date(Max({1< MonthYear>}Date_CleanDato)))", MonthYear=}>} DateKey)


Regards,

som

Not applicable
Author

Brilliant. Why doesnt my expression not work? can u explain?

What about this expression:

=Monthend(Max(Date_CleanDato)) - MonthStart(min(Date_CleanDato))

how do i do so its not affected by the same.

somenathroy
Creator III
Creator III

You have disregarded the selection only from count function using set modifier 1. But it needs to be included within Min and Max function also. For that reason MonthYear selection did effect on Min(Date_CleanDato) or Max(Date_CleanDato). Hope you will find ans your next query your self.

Regards,

som