Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 qlikviewaf
		
			qlikviewaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Guys,
as you can see below:
if i select just 2017 i got as budget 6640 which is correct,
if i select 2017 + AREA= Emea Distributor i got 6614 which is wrong
Anyone know why? i'm driving crazy...
find attached also the application

 
					
				
		
 prieper
		
			prieper
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		not all areas are mapped to region ...
 qlikviewaf
		
			qlikviewaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Everything is mapped, except "Corporate Adjustment" but it's ok
 
					
				
		
 prieper
		
			prieper
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		There is a calculation in it for calculating the budget. If you remove the
$(vWorkingDays)*$(vWorkingDaysSelected)
calculation seems to be fine.
Think that the error is within the logic of these variables, as values are calculated irrespectively your selections.
 qlikviewaf
		
			qlikviewaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I found that if i select Japan and Emea_Distributor i got the right amount, but honestly i don't get why i have to select both
 
					
				
		
 prieper
		
			prieper
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear Antonio,
when you select EMEA_Distributor, the variable vWorkingDaysSelected changes from 260 to 259,
thus sum of Budget will be multiplied not with 260/260 but with 260/259.
 qlikviewaf
		
			qlikviewaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Good point, but why? i set the variable in order to not consider the AREA selection.
=Sum({<Area=,Region_Description=,Region=, Month=, Quarter=, Week=, Day=,Year=,Invoice_Date=, Invoice_Date_Num={">=$(=Num(Min(Invoice_Date_Num)))<=$(=Max(Invoice_Date_Num))"}>} WorkingDay)
 
					
				
		
 prieper
		
			prieper
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The variable is still calculated within the dataset, so for Spain the minumum data is 03/01, whilst for all others it it 02/01.
Am not that firm with SET and there might be other and better solutions, but suggest to create a variable
vYearSelected = GETFIELDSELECTIONS (Year) // this way may work with multiple selections
and revise
vWorkingDaysSelected to
=SUM({1 <Year = {$(vYearSelected)}>} WorkingDay)
This variable would Sum all workingdays in the entires dataset, only considering the selection of the Year.
Peter
 qlikviewaf
		
			qlikviewaf
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		ok Peter,
there's a way to generate missing value based on distinct on the sales table?
Thanks
 
					
				
		
 prieper
		
			prieper
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		don't get your point
