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: 
Not applicable

Counting order rows

Hi.

I need to know how many orderlines is in one order.

I have a table with orderlines. and need to know on each line how many lines there is in total in that order. regardless if just one orderline is selected.

My table has theese fields:

ordernumber, orderline number, totalorderfreight, linesum, quantity, etc.

I tried to aggregate over ordernumber and count ordernumber, but that does not work.

( aggr(count(orderline), ordernr) )

any ideas?

2 Replies
Not applicable
Author

Hi. Try this:

=

count(all <OrderNo> OrderLine)



It will not be affected from a selection of a single order line. (However, it will be affected from the selection of an Order No, and will show of the number of rows of the selected Order)



Bye,

Montal.

Not applicable
Author

Try this

count({1<OrderNo = {$(=only(OrderNo))}>} total OrderLine)

Anders