Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to change the calculation to take into account the date of the order?

hello!

We have sales in the online shop.

Order column calculates the proportion of the products by category

but do not take into account the date of the order

how to change the calculation to take into account the date of the order?


Screenshot_3.png

if we choose a date on 01/01/2015 04/01/2015 .

01.01.2014 Order should not be taken into account

how to fill "new orders" column ?

1 Solution

Accepted Solutions
sunny_talwar

Try this:

=Sum({<Product_id = p({<Product_id = {"=Count(Date) = Count({1}Date)"}>})>} Aggr(

Count(DISTINCT {<Product_id = p({<Product_id = {"=Count(Date) = Count({1}Date)"}>})>} Product_id)/Count(DISTINCT TOTAL <Product_id> {<Product_id = p({<Product_id = {"=Count(Date) = Count({1}Date)"}>})>} Product_id),

Order_id, category_name))


Capture.PNG

View solution in original post

7 Replies
Anonymous
Not applicable
Author

you have not choosen 1/1/2015.see left calendar, it Shows 1/1/2014. So the tablebox Shows correct data

if you select 1/1/2015 on left calendar the tablebox Shows correct data

(the selection box should Show the selected data)

Not applicable
Author

Screenshot_4.png

when you select the calendar , the calculation does not change


Column Order has the following expression: 

= Sum(Aggr(

Count( DISTINCT Product_id)/Count( DISTINCT TOTAL <Order_id> Product_id),

Order_id, category_name))


Anonymous
Not applicable
Author

when i select 1/1/2015 to 1/2/2015 I get another result, as when no calendar date is selected (also showing 2014 data). Home changes from 1.83 to 2.83

Not applicable
Author


Is it possible to eliminate all of the data which relate to the order 1?


the first date is not included in the interval , therefore exclude the entire order

Anonymous
Not applicable
Author

that should be possible. adhoc I have no solution, seems to be a little tricky

sunny_talwar

Try this:

=Sum({<Product_id = p({<Product_id = {"=Count(Date) = Count({1}Date)"}>})>} Aggr(

Count(DISTINCT {<Product_id = p({<Product_id = {"=Count(Date) = Count({1}Date)"}>})>} Product_id)/Count(DISTINCT TOTAL <Product_id> {<Product_id = p({<Product_id = {"=Count(Date) = Count({1}Date)"}>})>} Product_id),

Order_id, category_name))


Capture.PNG

Not applicable
Author

Thanks!