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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
md_qlikview
Creator II
Creator II

Calculating Count

I am having a scenario where I have customers who has done some transactions by purchasing some goods. One customer is having multiple transactions and each transaction is also having date and mode of transaction.

Now, I want to calculate no of customers for each mode of transactions who has used that mode of transactions as his very first transaction. First transaction may be decided by the date of transaction.

Thanks In Advance

24 Replies
Anonymous
Not applicable

Hey MD:

Sorry I did not get enough time to get back earlier. I just want to make a quick point here. You mentioned that "you want to calculate no. of customers for each mode of transactions who has used that mode of transactions as his very first transaction and first transaction may be decided by the date of transaction".

Based on that that logic, I used 'Count(Aggr(FirstSortedValue(Mode, Date), Customer))' approach in my dataset but it did not give correct result. In attached doc, I have included 4 screenshot- my dataset, description what you want to see in table, output from my approach, and output from 'Count(Aggr(FirstSortedValue(Mode, Date), Customer))'. I did not find the correct output with Count(Aggr(FirstSortedValue(Mode, Date), Customer)).

I am not sure whether I misinterpreted your query. Please check if you get some time.

md_qlikview
Creator II
Creator II
Author

Hi Rajan,

I am not sure about how it is returning wrong output. I will definitely check and will let you know if i found any thread on this. And i must mention that the solution you have provided above is also correct, only the approach was different.

Thanks much

Anonymous
Not applicable

Glad that u checked. If you believe that I understood your query correctly then I know what is the problem with that Count(Aggr(FirstSortedValue(Mode, Date), Customer))' approach because initially I started doing sth similar but found incorrect output then I quickly switched to script editor and created flag to resolve ur query.

md_qlikview
Creator II
Creator II
Author

Hi

In the above example mentioned, if I want to calculate Amount as well, for only those mode which is coming as the first mode of transaction. What should be done? Here amount will be calculated for the first transaction only.

Thanks In Advance

md_qlikview
Creator II
Creator II
Author

How do I calculate amount as well for only those transaction, which is happens to be the first for a particular customer

using set analysis?

Thanks In Advance