Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
nm02
Contributor II
Contributor II

Filtering in Expression of Count()

Hello there,

I want to combine 2 filter in one function, but i can't figure it how to do it.

I have a table with several coloums of which only the [Result] matters.
I have another table where I assign every [Machine] a [MachineCategory] based on some parameters.


My goal is to Count all [Result] = 'not Ok' in one specific [MachineCategory] (which you can filter via variable input with variable #vMachineCategory).


I have these two filters:

 

Count({<Result={'not Ok'}>}Result))*100/Count(Result)

 

- This gives me the percentage of [Result] = 'not Ok' out of all [Result]

 

 

Count({<MachineCategory={'$(#vMachineCategory)'}>}Result)

 

- This counts all items in [Result] in a [MachineCategory]

 

My pseudo code looks something like this:

Count({<MachineCategory={'$(#vMachineCategory)'}>}Result{<Result={'not Ok'}>})

Sadly, this doesn't work. I don't know if it's because of a syntax error on my side or because you can't filter in the expr Expression of the Count function.

 

I would love to get your ideas on that, thanks in advance.

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
MarcoWedel

Count({<MachineCategory={'$(#vMachineCategory)'}, Result={'not Ok'}>} Result)

View solution in original post

2 Replies
MarcoWedel

Count({<MachineCategory={'$(#vMachineCategory)'}, Result={'not Ok'}>} Result)

nm02
Contributor II
Contributor II
Author

Thank you very much, it works perfectly!