Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sxbbb
Creator III
Creator III

I figured out the code and got the wrong value.

I want to create a table like this

Sxbbb_0-1677052853365.png

 

 

Where 'With in spec' comes from Value>=Min and Value <=Max.
Example 1 work order

Sxbbb_1-1677052853420.png

 

I can do it but then the Data  is wrong.

 

Sxbbb_2-1677052853366.png

 

Sxbbb_3-1677052853421.png

 

used code of  'With in spec'.

(Count(Aggr(if(Value>=Min and Value <= Max,1,0),Line,WorkOrder,SampleNo,Point))).

Labels (5)
2 Replies
hic
Former Employee
Former Employee

I assume that a WorkOrder can have many Samples, and a Sample can have many Points.
And you want ALL OF THEM to be within specs in order for the WorkOrder to be WithinSpec?

Try

Count(distinct {<WorkOrder={"=Max(Value)<=Max and Min(Value)>=Min"}>} WorkOrder)

or

Count(distinct Aggr(if(Value>=Min and Value <= Max,WorkOrder),Line,WorkOrder,SampleNo,Point))

Sxbbb
Creator III
Creator III
Author

I try  Count(distinct {<WorkOrder={"=Max(Value)<=Max and Min(Value)>=Min"}>} WorkOrder) 

This is Result 

Sxbbb_0-1677463271592.png

 And I Want  Out of Spce  

Sxbbb_1-1677463970970.png

 I Try I try  Count(distinct {<WorkOrder={"=Max(Value)>=Max and Min(Value)<=Min"}>} WorkOrder) 

Result 

Sxbbb_2-1677464218663.png

But Total With in spec Sum Total out of Spec not equal Total WorkOrder 

1618+964 not equal  8996  ( Total WorkOrder )

should be combined to equal Total WorkOrder