Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 md_qlikview
		
			md_qlikview
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You mean if for a minimum date there are 2 Modes of transaction: For example, Cash and Check?
 
					
				
		
 md_qlikview
		
			md_qlikview
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		yes, in that case it is giving me null and hence count of customer will be ultimately null
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In that case which one would you like it to be counted towards? Cash or Check or both?
 
					
				
		
 md_qlikview
		
			md_qlikview
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			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
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Check this:
 
					
				
		
 md_qlikview
		
			md_qlikview
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes, it is working. I have to check this with multiple scenarios.
Thanks much
 sunny_talwar
		
			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
		
			md_qlikview
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks a lot everyone who has chipped in, and shown your sincere efforts. I got it required output.
Thanks much.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Awesome 
