Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Not applicable

Variable in Set analysis

Hello, guys!

Need your help.

I need to create an expression in straight table summing values from current month till the end of Dec.

I've got a date field in my script named Vacation_Date with format like 'MMM-YY'.

I've created a variable for current month: vCurrentM=Date(Monthstart(Today()),'MMM-YY')

I try an expression like :Sum({<Vacation_Date={">=$(=vCurrentM)<='Dec-15'"},Vacation_Date=>} Days), but it doesnt work correctly, it sums up all the values of the year.

Any ideas on how to get the desired result?

Sample application is attached.

Thnx!

1 Solution

Accepted Solutions
Highlighted

Re: Variable in Set analysis

Try this expression:

Sum({<Vacation_Date={">=$(=vCurrentM)<='Dec-15'"}>} Days)

View solution in original post

3 Replies
Highlighted

Re: Variable in Set analysis

Try this expression:

Sum({<Vacation_Date={">=$(=vCurrentM)<='Dec-15'"}>} Days)

View solution in original post

Highlighted
MVP
MVP

Re: Variable in Set analysis

Create one more variable

vYearEnd

Date(YearEnd(Today()),'MMM-YY')

Now use this expression

=Sum({<Vacation_Date = {">=$(vCurrentM)<=$(vYearEnd)"}>}Days)

Highlighted
Partner
Partner

Re: Variable in Set analysis

I got it by this way:

goto document properties, tab number

select your field Vacation_Date

define it as date to "MMM-YY" (currently it's mixed)

your table wwas showing correct data immediately