Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 kruel830
		
			kruel830
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I have a problem as in database weekly item consumption forecasts are always dated for mondays, but ERP distributes them evenly on working days. As ERP numbers are "correct" and Qlik shows it "wrong", how it is possible to divide forecast as ERP does it?
For example 30.8.2021 forecast shows 10 units, what I want is 2 units for 30.8., 2 units for 31.8., 2 units for 1.9., 2 units for 2.9. and 2 units for 3.9.. And so on.
Please help me to understand how this should be done in Qlik.
 JordyWegman
		
			JordyWegman
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You could try this:
// Load the forecast and get the daily average
Forecast:
Load
    Week,
    Forecast / 5 as DayAverage
From [YourSource] (qvd) ;
// Join all the working days from a calendar. This will expand the Forecast table.
Left Join ( Forecast )
Load
    Week,
    Date
From [YourSource] (qvd) 
Where NOT Match( Day( Date ) , 'Sat', 'Sun' ) 
;Jordy
Climber
 JordyWegman
		
			JordyWegman
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You could try this:
// Load the forecast and get the daily average
Forecast:
Load
    Week,
    Forecast / 5 as DayAverage
From [YourSource] (qvd) ;
// Join all the working days from a calendar. This will expand the Forecast table.
Left Join ( Forecast )
Load
    Week,
    Date
From [YourSource] (qvd) 
Where NOT Match( Day( Date ) , 'Sat', 'Sun' ) 
;Jordy
Climber
 kruel830
		
			kruel830
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Your solution gave the result I was expecting. Thank you!
