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: 
Baavik
Contributor III
Contributor III

2 filter selection in the same table

Hi,

I am struggling to compare 2 selected months data in a table as shown in test data (Attached).

Now user wants to compare any 2 months score based on his month selection as shown below -

Baavik_0-1704696478205.png

Thank you !!!

Labels (1)
8 Replies
vinieme12
Champion III
Champion III

why not use a pivot table?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
RamanaKumarChintalapati
Partner - Creator
Partner - Creator

Hi @Baavik ,

By using pivot tables can filter 2 months  score based on month selection.

RamanaKumarChintalapati_0-1704708736269.png

 

Hope this helps you.

Thanks!!!

 

Ahidhar
Creator III
Creator III

you can do this by Pivot Table or creating two  alternate states and using them in filter panes and set expression

https://help.qlik.com/en-US/sense/November2023/Subsystems/Hub/Content/Sense_Hub/Visualizations/alter...

Ahidhar_0-1704709244131.png

 

Baavik
Contributor III
Contributor III
Author

@RamanaKumarChintalapati  Thanks for the quick reply!!

But I'm working on a straight table.

Any other option for this?

 

Thanks !!

Baavik
Contributor III
Contributor III
Author

 But I'm working on a straight table.

It would be helpful if there's any other option pls.

Baavik
Contributor III
Contributor III
Author

@Ahidhar -  creating alternate states worked for this. Thanks a lot !!

Also can you pls help me in labeling the selections, as GetSelectedcount({GROUP2}Month) is not working in alternate states.

Ahidhar
Creator III
Creator III

try,  GetSelectedcount({[GROUP2]}Month)

Baavik
Contributor III
Contributor III
Author

hi @Ahidhar !!!

As per the above filter selection using alternate states, we are getting the sum(score) of that particular selection, i.e., 24 for Group1 selection and 26 for Group2 selection.

But my requirement is that, user will compare the individual scores of each staff id and based on that, we need to give a status column representing like-

   If both scores are equal - Same

 If score of selection 1 month < score of selection month 2 - Increase

 If score of selection 1 month > score of selection month 2 - Decrease

Based on this Status column, we need to  get the count(staff Id) for same/increase/decrease - i.e., like how many of them have an increase in score/decrease/same in their scores.

I have used the below expression for Increase status -

If(sum({<Date={'$(=Date(Max({GROUP1}Date),'YYYY-MM-DD'))'}>}Score)<
sum({<Date={'$(=Date(Max({GROUP2}Date),'YYYY-MM-DD'))'}>}Score),Count([Staff ID]))

But this is not working , I have tried with only/count but no luck !!!

All these status need to be represented in a stacked bar chart with different colour codes.

Attaching images for your reference. 

Any leads is much appreciated !!! TIA !!

Baavik_0-1707799439556.png

 

 

Baavik_1-1707799518239.png