Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Default filter in a pivot table

Hello, it's me again, I have other problem.

I need to implement a conditional count in a pivot table with 2 dimensions: Month and Recruit/Termination, which is a dimension related to the different types of employee recruitment or termination. Normally, the NumericCount() function will count how many employees were recruited/terminated for each month and each type of recruitment/termination.

But I also need to apply a filter related to certain values of a dimension not shown in the pivot table, e.g. "State", and the allowed cases are State = "A" and State ="B", and I don't want the user to apply the filter by clicking values in a list box.

So the question is. ¿Is it possible to apply a default filter by code? and if so, ¿how can I do it? If I want to sum the results for columns "november" and "december" to create a column "EndYear", how can I do it?

I hope you can help me with this problem, regards!

1 Solution

Accepted Solutions
MayilVahanan

Hi

     Use,

     =Count({<State={'A','B'}>}distinct Employee)

    

     or

          =Count({<State={'A','B'}>}Employee)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

Hi

     Use,

     =Count({<State={'A','B'}>}distinct Employee)

    

     or

          =Count({<State={'A','B'}>}Employee)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

That's exactly that I need, thanks you