Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
prathmeshb27
Contributor II
Contributor II

Filtering dimension based on object selection button

Hi, I have a dimension as STATUS which includes different fields like opened, cancelled,......etc . I created one text object I see it as a button. Whenever I click button the table should show all the record including  (cancelled) and again when I click button it should show all the record except (cancelled). How can I do that?

Labels (1)
1 Reply
sidhiq91
Specialist II
Specialist II

@prathmeshb27  Please follow the below steps:

Step 1: I created a sample data in load script Editor

NoConcatenate
Temp:
Load ID, Status, Date(Date#(Date,'MM/DD/YYYY'),'MM/DD/YYYY') as Date

Inline [
ID, Status, Date
1, Opened, 03/11/2023
2, Cancelled, 04/11/2023
3, Cancelled, 05/11/2023
4, Closed, 06/11/2023
5,Re-Opened,07/11/2023
];

Step2: Create 2 straight tables one for Cancelled Status and one for other Status

To get only Cancelled Status I used the below expression:

Aggr(Only({<Status={'Cancelled'}>}Status),Status)

To get other Status I used another expression:

Aggr(Only({<Status-={'Cancelled'}>}Status),Status)

sidhiq91_0-1701576599821.png

Step 3: To create a toggle button between 2 Status, follow the link below:

https://www.youtube.com/watch?v=PLlguzpVdB0

If this resolves your issue, please like and accept it as a solution.