Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
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
sunny_talwar

You mean if for a minimum date there are 2 Modes of transaction: For example, Cash and Check?

md_qlikview
Creator II
Creator II
Author

yes, in that case it is giving me null and hence count of customer will be ultimately null

sunny_talwar

In that case which one would you like it to be counted towards? Cash or Check or both?

md_qlikview
Creator II
Creator II
Author

As of now, i am not clear about it. But what if i am having multiple transactions but of the same type eg. Cash then how will i will choose one.

sunny_talwar

Then you can use this:

=Count(Aggr(FirstSortedValue(DISTINCT Mode, Date), Customer))

It will show your syntax error, but the expression should work.

sunny_talwar

Check this:

Capture.PNG

md_qlikview
Creator II
Creator II
Author

Yes, it is working. I have to check this with multiple scenarios.

Thanks much

sunny_talwar

No problem

I am glad we were able to help you here. I know you are still checking, but I would suggest marking correct answers and Helpful answers once you have your finalized solution

Best,

Sunny

md_qlikview
Creator II
Creator II
Author

Thanks a lot everyone who has chipped in, and shown your sincere efforts. I got it required output.

Thanks much.

sunny_talwar

Awesome