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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
mahieuphilippe
Creator
Creator

How to filter a count with a condition

Hi i have this result :

itemcodedistnumberonhandqty
1800000038127-07952.540000
1800000038127-08952.540000
1800000038127-09952.540000
1800000038127-10952.540000
1800000038127-13952.540000
1800000038127-14952.540000
1800000038127-15952.540000
1800000038127-16952.540000
1800000038127-17952.540000
1800000038127-18952.540000
1800000038127-19952.540000
1800000038127-20952.540000
1800000038128-01952.540000
1800000038128-02952.540000
1800000038128-03952.540000
1800000038128-04952.540000
1800000038128-05952.540000
1800000038128-06952.540000
1800000038128-07952.540000
1800000038128-08952.540000
1800000038128-09952.540000
1800000038128-10952.540000
1800000038128-11952.540000
1800000038128-12952.540000
1800000038128-13952.540000
1800000038128-14952.540000
1800000038128-15952.540000
1800000038128-16952.540000
1800000038128-17952.540000
1800000038128-18952.540000
1800000038128-19952.540000
1800000038128-20952.540000
1800000040132-35400.000000
1800000040132-36400.000000
1800000040132-37400.000000
1800000040132-38400.000000
1800000040132-39400.000000
1800000040132-40400.000000
1800000040133-01400.000000
1800000040133-02400.000000
1800000040133-03400.000000
1800000040133-04400.000000
1800000040133-05400.000000
1800000040133-06400.000000
1800000040133-07400.000000
1800000040133-08400.000000
1800000040133-09400.000000
1800000040133-10400.000000
1800000040133-11400.000000
1800000040133-12400.000000
1800000040133-13400.000000
1800000040133-14400.000000
1800000040133-15400.000000
1800000040133-16400.000000
1800000040133-17400.000000
1800000040133-18400.000000
1800000040133-19400.000000
1800000040133-20400.000000
1800000040133-21400.000000
1800000040133-22400.000000
1800000040133-23400.000000
1800000040133-24400.000000
1800000040133-25400.000000
1800000040133-26400.000000
1800000040133-27400.000000
1800000040133-28400.000000
1800000040133-29400.000000
1800000040133-30400.000000
1800000040133-31400.000000
1800000040133-32400.000000
1800000040133-33400.000000
1800000040133-34400.000000
1800000040133-35400.000000
1800000040133-36400.000000
1800000040133-37400.000000
1800000040133-38400.000000
1800000040133-39400.000000
1800000040133-40400.000000

 

i  want only a résult by item code with only the min of the three first number of distnumber and a count of this condition so the result is :

 

into my table graphic i use 

first colum =  dimension 

second :  Min( SubField(distnumber, '-', 1) )  (take only the min of the distnumber)

last colum  :count(
{<
distnumber = {"*$(=Aggr(Min(Left(distnumber,3))), U_CapacItemcode)*"}
>} distnumber
)

 

i have this result  (no correct, the correct is  12  for the O-71 (1800000038) , here is the total of the distnumber 127 and 128 of the 1800000038  (O-71)

mahieuphilippe_0-1763539945143.png

 

this is the correct result   how to have the good résult ?  thanks

 

180000003812712
18000000401326
Labels (1)
1 Reply
Nagaraju_KCS
Specialist III
Specialist III

Try this 

YourData:
Load * subfield(distnumber,, '-', 1) as dist_firstnumber;
Load * Inline [
itemcode, distnumber, onhandqty                                                                                                              ........................
];

MinValue:
Load itemcode,
         Min(dist_firstnumber) as distinctValue
resident Yourdata;

chart expression
Count({<dist_firstnumber=P(distinctValue)>}itemcode)