Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kolov007
Contributor III
Contributor III

Sales from the date of sale of the goods

Please help me to solve this task.

I need to calculate the amount of sales of all products for each country, starting with the first date of sale of product 1.

Screenshot_1.png

Germany's sales should be equal to 119, but when I see all the countries, the sales are not counted from the first date of the start of the sales of goods 1 in Germany, but from the first sales date of the goods 1 in the entire database.

Screenshot_3.png

Screenshot_4.png

9 Replies
kolov007
Contributor III
Contributor III
Author

I try to solve this with this solution sum({<Date = {">=$(=min({<Product = {'Product 1'}>} Date))"}>} Quantity)

but it's not correct.

Anil_Babu_Samineni

How you are getting 119?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
kolov007
Contributor III
Contributor III
Author

Screenshot_1.png

Anonymous
Not applicable

aggr(sum({<Date = {">=$(=min({<Product = {'Product 1'}>} Date))"}>} Quantity),Region)

kolov007
Contributor III
Contributor III
Author

It's not working

Anonymous
Not applicable

try this

aggr(sum({<Date = {"$(=date((Min(Date),"MM/DD/YYYY"))"},Product={"Product 1"}>} Quantity),Region)

kolov007
Contributor III
Contributor III
Author

It's not working too

Screenshot_1.png ! !

antoniotiman
Master III
Master III

Hi Evgen,

like this ?

Regards,

Antonio

effinty2112
Master
Master

Hi Evgen,

Try this straight table:

Region Sales all products from start sales of product 1
254
Germany119
Italy135

The expression is:

sum(If(Date >=Aggr(NODISTINCT min({$<Product = {'Product 1'}>}Date) ,Region) ,Quantity))

Regards

Andrew