Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 krishna20
		
			krishna20
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Friends,
I have a Requirement like The Below
when user select multiple month we need to take min status and max status
then we need to compare whether status is same if status is same we need not count
Ex:--if u select jan and feb month jan min status is positive and feb max status is feb
this senario we need not count
could any one suggest me the best solution
Thanks
Input
| ACCOUNT_ID | PREVCLUSTER | CURRCLUSTER | PREV_FOR_STATUS | CURR_FOR_STATUS | cluster_ind | START_DATE | END_DATE | MonthYear | Quarter | 
| 235863 | positive | Neutral | Unrestricted | In Progress | Neutral | 10/12/2015 | 20/12/2015 | Dec-15 | Q4 | 
| 235863 | Neutral | positive | In Progress | Approved | positive | 16/01/2016 | 20/01/2016 | Jan-16 | Q1 | 
| 235863 | positive | Nagative | Approved | Blacklist | Nagative | 11/02/2016 | 20/02/2016 | Feb-16 | Q1 | 
| 235863 | Nagative | Neutral | Blacklist | NA | positive | 16/03/2016 | 20/03/2016 | Mar-16 | Q1 | 
| 235863 | Neutral | positive | NA | Approved | positive | 05/05/2016 | 10/05/2016 | May-16 | Q2 | 
| 235863 | positive | Nagative | Approved | Rejected | Nagative | 05/06/2016 | 12/06/2016 | Jun-16 | Q2 | 
| 235863 | Nagative | Neutral | Rejected | None | positive | 04/07/2016 | 08/07/2016 | Jul-16 | Q3 | 
| 235863 | Neutral | Nagative | None | Rejected | Nagative | 14/08/2016 | 20/08/2016 | Aug-16 | Q3 | 
| 235863 | Nagative | positive | Rejected | Approved | positive | 05/10/2016 | 10/10/2016 | Oct-16 | Q4 | 
| 235863 | positive | Neutral | Approved | In Progress | Neutral | 09/12/2016 | 12/12/2016 | Dec-16 | Q4 | 
 
					
				
		
 lironbaram
		
			lironbaram
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi
this should work for you
=sum(aggr(if(only({<MonthYear={'$(=min(MonthYear))'}>}CURR_FOR_STATUS)<>only({<MonthYear={'$(=max(MonthYear))'}>}CURR_FOR_STATUS),1,0),ACCOUNT_ID))
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How are you estimating the status? based on dates?
May be this:
If(FirstSortedValue(PREVCLUSTER, -MonthYear) = FirstSortedValue(PREVCLUSTER, MonthYear), 1, 0)
 
					
				
		
 lironbaram
		
			lironbaram
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi
this should work for you
=sum(aggr(if(only({<MonthYear={'$(=min(MonthYear))'}>}CURR_FOR_STATUS)<>only({<MonthYear={'$(=max(MonthYear))'}>}CURR_FOR_STATUS),1,0),ACCOUNT_ID))
 
					
				
		
 krishna20
		
			krishna20
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		yes
your correct
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		So is the above expression working or not?
