Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set a MTD range based on date selection

Hello,

I'm having trouble creating a MTD button that selects the date range based on the date I select.

For instance, if I select 06/29/16, then click the MTD button, I want the date field to select the date range 06/01/16 - 06/29/16.

Any help is greatly appreciated.

Thank you!

9 Replies
sunny_talwar

May be set the search string expression to be like this:

='>=' & Date(MonthStart(Max(DateField)), 'MM/DD/YY') & '<=' & Date(Max(DateField), 'MM/DD/YY')

Anonymous
Not applicable
Author

Thank you for the reply Sunny.  I figured it was something like this, however, my button just seems to clear the date selection when I put this into my search string.  I'm replacing DateField with my actual field and formatting it.

sunny_talwar

Can you share the screen shot of your search string and also your datefield?

Anonymous
Not applicable
Author

Here's the date field I'm using and a screenshot of the search string

SSDate.pngSSExp.png

sunny_talwar

Can you try to check after adding the Date field format?

='>=' & Date(MonthStart(Max(%D_PERD)), 'M/D/YY') & '<=' & Date(Max(%D_PERD), 'M/D/YY')

Anonymous
Not applicable
Author

No luck It's still clearing the date field whenever I select a date

sunny_talwar

Do you have another action assigned to the button or a trigger on %D_PRED?

Anonymous
Not applicable
Author

I have no other action on the button and no triggers on %D_PERD

SSButton.pngSSTriggers.png

sunny_talwar

Not sure what is wrong, would it be possible to share a sample?

Preparing examples for Upload - Reduction and Data Scrambling

Uploading a Sample