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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
snehamahaveer
Creator
Creator

Combining sales from 2 customers based on conditions

Hi All,

Please find my sample data attached.

I am trying to identify the sales for Customer ABC, based on specific agreement requirements. It also needs to add data from different customers(eg CDE - distributor) if the delivery address match.

Can someone help with creating a formula that identifies the sale of Agreement products for the year 2016(after start date).

This requirement is pretty urgent, and a quick turnaround is essential.

Your help is much appreciated.

Thanks,

Sneha

5 Replies
vinieme12
Champion III
Champion III

what is the expected output, can you post that as well?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps this expression:

sum({<Customer={'ABC'},[Agreement ID]={12345},Date={">=$(=MakeDate(2016,4,1))<=$(=MakeDate(2016,12,31))"},Product={'Apple','Banana','Orange'}> + <Delivery_address=P({<Customer={'ABC'},[Agreement ID]={12345},Date={">=$(=MakeDate(2016,4,1))<=$(=MakeDate(2016,12,31))"},Product={'Apple','Banana','Orange'}>}Delivery_address), Date={">=$(=MakeDate(2016,4,1))<=$(=MakeDate(2016,12,31))"},Product={'Apple','Banana','Orange'}>} Sales)


talk is cheap, supply exceeds demand
el_aprendiz111
Specialist
Specialist

Hi,

DatesSum.gif

snehamahaveer
Creator
Creator
Author

Hi ,

The expected output is within a Straight table.

Agreement Id, Start date, Sales (combined sales), predicted sales at the end date of agreement.

snehamahaveer
Creator
Creator
Author

Hi Gysbert,

Thanks for the expression. However, this has to go in a table, where the same formula is to be used for atleast 100 other customers with or without the same problem.

Can this be simplified?

Thanks,

Sneha