Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
-Oliver-
Partner - Contributor II
Partner - Contributor II

Bug using Button Actions

Hi,

we are using QlikSense in the German language with version
Qlik Sense February 2023 Patch 2 (qliksenseserver: 14.113.4).

We would like to set date filters using buttons Button1 and Button2 respectively. For better error representation, I am using absolute date values here.

In Button1:
Action 1: "Clear selections in field", Field: Key_Date
Action 2: "Select values in a field", Field: Key_Date, Function:  '1.2.2023;2.2.2023;3.2.2023;4.2.2023;5.2.2023;6.2.2023;7.2.2023;8.2.2023;9.2.2023;10.2.2023'

In Button2:
Action 1: "Clear selections in field", Field: Key_Date
Action 2: "Select values in a field", Field: Key_Date, Function: '5.2.2023;6.2.2023;7.2.2023;8.2.2023;9.2.2023;10.2.2023;11.2.2023;12.2.2023;13.2.2023;14.2.2023'

If no filter is active on Key_Date, pressing the respective button sets the filter. However, if a filter is already set and the other button is pressed, the filter is not reset as intended in Action 1 and then set the new filter. Instead, the intersection of both filters is activated: '5.2.2023;6.2.2023;7.2.2023;8.2.2023;9.2.2023;10.2.2023'

This filter can then only be reset through the filter pane.

Therefore, I kindly request a prompt resolution.
Feel free to reach out if you have any questions.

Sincerely
Oliver Kunz

Labels (2)
5 Replies
Chirantha
Support
Support

Hey Oliver,

 

Please see if this solution works as suggested in a different post

marcus_sommer

I don't know how the actions are implemented within Qlik Sense but in QlikView the actions do run in parallel - and I could imagine that this behaviour hasn't changed. This means you couldn't apply any chain of actions if they are depending on each other - at least not if you really a stable solution. This means it's not a bug else it would be working as designed.

Beside this I suggest to consider the usage of actions because they aren't needed to create a good user-experience in which the users just select what they want to see. Choosing values directly or per search-approaches like you described is neither complicated nor need they much efforts - or in other words all the magic with buttons + actions and so on have no real benefits (in many cases it's directly the opposite).

Especially in regard to any period-views all needed selections and flags could be created within one or several master-calendars and/or as-of-tables.

-Oliver-
Partner - Contributor II
Partner - Contributor II
Author


Especially in regard to any period-views all needed selections and flags could be created within one or several master-calendars and/or as-of-tables.

Hi Marcus,
I cannot agree to the above. There is of course a need of calculation of date ranges:
Think of switching between
a) YTD (YearToDate from 1.Jan to actual date of the current year)
and
b)MAT (MovingAnnualTotal (from actual date backwards with a chosen variable number of days as for example 3W, 4M, 2Y...) 
using two buttons and an input variable (for MAT)

There is no good strategy of creating many calendars and tables...


 

-Oliver-
Partner - Contributor II
Partner - Contributor II
Author

Hi Chirantha,
I haven't made the mistake described in the solution link you posted.

marcus_sommer

I didn't say that there are no reasons to calculate measures against any date-ranges else it's not the best choice to generate these date-ranges within the UI and using them as selections and/or dimensions and/or variables and/or set analysis conditions with or without the help of buttons and actions.

Nearly all of this could be done much simpler within a calendar. And it could be done once and be re-used over all years for all ETL tasks and reports. The final application just picked the needed periods and fields from this qvd and may apply some kind of renaming and also how many date-fields may need an own and/or a combined calendar.

It couldn't be simpler! And there are a lot of postings to this topic within the community. The following will be a good starting point:

How to use - Master-Calendar and Date-Values - Qlik Community - 1495741