Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
martinpohl
Partner - Master
Partner - Master

Dynamic filter in automation

Hi,

can anybody explain how to set a dynmic filter in application automation?

I want to select in field Year month the value of actual month, in expression it would be date(today(),'YY MMMM').

Thank you

Labels (1)
1 Solution

Accepted Solutions
martinpohl
Partner - Master
Partner - Master
Author

after changing to 

text(date(monthstart(Usingdate),'MM YYYY')) as MonthYear

and set filter to

m 20y

it works!

View solution in original post

4 Replies
Ionut_Dumitrascu

Hi @martinpohl ,

In order to dynamically get the current year - month, you can use the following formula: 

 

 

{date: 'now', 'Y-m'}

 

 

 where 'now' gets the current date value and 'Y-m' is the output format which can be adjusted to match your needs. I also attached an example that you can upload in a new automation to check it out.

Regards,

Ionut

Ionut_Dumitrascu

Hi @martinpohl ,

Please also check the following articles that explain how to work with formulas and dates in an automation.

Kind regards,
Ionut

martinpohl
Partner - Master
Partner - Master
Author

Great, first check was ok.

But there is a problem with date format.

I'm using

date(monthstart(Usingdate),'MM YYYY') as MonthYear.

when I'm using now and format mm yyyy, it doesn't work.

I've checked the values in valuelist (do lookup). There I can see:

12 2021 (44531)

11 2021 (44501)

As I know, date and month information in fields are stored as dual, so you can see the day also in the value.

How can I achive to select the actual month by "select field value"?

Regrads

martinpohl
Partner - Master
Partner - Master
Author

after changing to 

text(date(monthstart(Usingdate),'MM YYYY')) as MonthYear

and set filter to

m 20y

it works!