3 Replies Latest reply: Mar 10, 2017 8:33 AM by Karthik Srinivasan

# qliksense help: to calculate items per order

Hi,

I am developing a dashboard in qliksense and stuck at 1 point and require help.

so i need to count no of items per order and if there is only 1 item then calculate % of such orders.

i wrote the formula as :

if((if(not isnull(week) ,count(distinct(item)))

/

if(not isnull(week), count(ORDER)))=1,count(ORDER))

/

if(not isnull(week) ,count(distinct(ORDER)))

when i convert it to % the value i get is above 100%, so basically it is calculating all the items/ all the orders.

what i need is: create another table where you count the number of items per order

then on this table you count the number of orders with only one item

how to do this???

• ###### Re: qliksense help: to calculate items per order

Would you be able to share some raw data and the output you expect to get out of it?

• ###### Re: qliksense help: to calculate items per order

Hi,

try this...

//Script...

TempOrders:

Num_Orders,

Count(DISTINCT item) as Cant_item

Resident Orders

Where NOT IsNull(week)

Group By Num_Orders;

//mMtrics in graphics...

=Count({< Cant_item={1} >} Num_Orders) / Count(Num_Orders)

Best regards,

German

• ###### Re: qliksense help: to calculate items per order

Hi Souyma,