Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
ZoeM
Contributor II

Count values greater than specified

Hi Community.

I am hoping someone can help me formulate an expression that counts  how many dimensions meet a specific requirement.

In the attached dashboard, I need to populate 3 fields in the straight table: 1 Try, 2 Tries and > 2 Tries.

1 Try = # Components that were tried only once

2 tries = # Components that were tried a sum of two

> 2 Tries = # Components that were tried greater than sum of 2 times. 

I truly appreciate it.

Tags (3)
1 Solution

Accepted Solutions

Re: Count values greater than specified

Is this what you are after?

image.png

9 Replies
vvira1316
Valued Contributor II

Re: Count values greater than specified

Can you please include your expected result? You can create that manually in an excel to illustrate it. It is not clear what is the expectation.

The table are behaving in certain way as some of the dimensions are not part of the table, so values are getting grouped based on the dimensions that are part of that table.

ZoeM
Contributor II

Re: Count values greater than specified

If you look at the # Tries per Component Straight Table, the expected result should be:

1 Try = 1 component (1123)

2 Tries = 2 Components (1124, 1123)

> 2 Tries = 3 Components (1124, 1122 (for Jeep), 1122 (for Dodge))

vvira1316
Valued Contributor II

Re: Count values greater than specified

Based on what groupings (dimensions) you will be getting these counts.

ZoeM
Contributor II

Re: Count values greater than specified

IndustryMakeComponents1 Try2 Tries> 2 Tries
 Total Tests  123
CarDodge1122  4
CarJeep1122  7
CarDodge1123 2 
CarJeep11231  
CarDodge1124 2 
CarJeep1124  6

 

Let me know if the above helps, so each car line (Dodge, Jeep) will go through three types of testing and we want to find out how many tests it took to complete each component (1, 2, >2)

Re: Count values greater than specified

Is this what you are after?

image.png

ZoeM
Contributor II

Re: Count values greater than specified

This is exactly what I am after Sunny!!

Thank you Community.

ZoeM
Contributor II

Re: Count values greater than specified

hey Sunny, what if Make = Dodge and Component = 1122 had two instances of 1 on 1st Try? So then the 1 Try would have to be counted twice, is there any way of counting Distinct in the expression?

Re: Count values greater than specified

Would you be able to update the qvw to show the issue?

ZoeM
Contributor II

Re: Count values greater than specified

Not a problem, please see attached.

I created Component 1121 associated with Jeep and it is showing 2 Tries for a value of 2, when it should be two 1122 line items each completed once.

Dodge Charger 1122 should show two 1 Tries, one 2 Tries, and one > 2 Tries