Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor

Sliders and Set Analysis

I have a slider defining variables (vStrtDate and vEndDate) on a sale date ranging from 1-Jan-2013 to till date. I am using these variables on an aggregation (count) in a set analysis statement. I want only completed months data but not the current months data. If today is 15th May, I wanted data from 1st Jan 2013 to 31st May 2018 without using IF statement anywhere neither in defining variables or in expressions in frontend objects.

Only data of completed months should be taken into consideration.

Thank you.

Ram

1 Reply
Highlighted
MVP
MVP

Re: Sliders and Set Analysis

Do you have a calendar with months in your model?

Some ideas: set the upper limit of the vEndDate slider to the last month end date. That way the user can never select a date in the current (incomplete) month.

Or use RangeMin(vEndDate, vMaxCompleteMonths) where vMaxCompleteMonths is a variable that returns the last complete month. Define vMaxCompleteMonths something like this:

Set vMaxCompleteMonths = '=Date(Floor(MonthEnd(Max(Month, 2))))';

or

Set vMaxCompleteMonths = '=Date(Floor(MonthEnd(Max(Month). -1)))';

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein