Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change value of variable in Buttons (or Macro)

Hello,

I want to insert three buttons, "previous month", "current month" and "next month". For getting the actual month I got a "MonthCounter" integer variable. But when I set it in the buttons the change in this variable is not done right away (That means I have to click twice to get the chage working).

So I thought of changing it with a macro but don't get it working.

Anyone any Idea?

Thanks

Peter

1 Reply
marcus_sommer

I think you didn't need variables for this. You could use OnSelect-Actions within the buttons, try something like this:

Button for current month with search-string:

= only({<Month = {"$(=month(today()))"}>} MonthCounter) // and +- 1 for next/previous month

- Marcus

German User Group - Deutsche User Group