Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 zakpullen
		
			zakpullen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
The dimension 'Position' is made up of unique id numbers, each having a value between 0 and 1. This value can change by month. I want to compare values for each position for the selected month and the previous month. This is straightforward, except that position numbers that existed last month, but not in the selected month are not included.
How can I include positions that existed last month, but not this month?
Many thanks.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be try this for previous month
Sum({<MonthYear = {">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>} Aggr(Max({<MonthYear = {">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>}[Position FTE]), Position)) sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		What expression/s are you using right now?
 zakpullen
		
			zakpullen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Selected month:
sum(aggr(Max([Position FTE]),Position))
Previous month:
sum({<MonthYear={">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>}aggr(Max([Position FTE]),Position))
Thanks
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be try this for previous month
Sum({<MonthYear = {">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>} Aggr(Max({<MonthYear = {">=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))<=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}>}[Position FTE]), Position)) zakpullen
		
			zakpullen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Amazing! Thank you so much.
