Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hello guys,
I need to add target amount which is ordered by salesperson and date (Month and Year)
How can I import this ? My targets are in Excel with
Salesperson, Date,
Target_Month, Target_Year ( ---> Targets are in Amount)
The other basic table:
DocNo,
Salesperson, Date, AccountNo, Amount,.
 
					
				
		
 florentina_doga
		
			florentina_doga
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		table:
load DocNo,Salesperson, Date, AccountNo, Amount,
MonthStart(Date) as Target_Month,
YearStart(Date) as Target_Year
from sursa.qvd;
Concatenate (table)
load Salesperson, Date, Target_Month, Target_Year
FROM
xxx.xlsx
(ooxml, no labels, table is Sheet1);
 
					
				
		
Well, my fault..
I want to add the targets by month and years per salesperson like
| Salesperson | Date | MonthStart(Date) as Target_Month ?? in Amount | YearStart(Date) as Target_Year ?? in amount | Header 5 | 
|---|---|---|---|---|
| AA | 01.01.2015 | 100 | 1200 | |
| AA | 02.02.2015 | 100 | 1200 | |
| AA | 03.03.2015 | 100 | 1200 | |
| BB | 01.01.2015 | 200 | 2400 | |
| BB | 02.02.20015 | 200 | 2400 | 
at the end, I want to get this
| Salesperson | Date | Month | Year | sum(amount) | sum(target_amount)? | 
|---|---|---|---|---|---|
| AA | 01.01.2015 | January | 2015 | 130 | 100 | 
| AA | 02.02.2015 | February | 2015 | 50 | 100 | 
| AA | 03.03.2015 | .. | .. | 70 | 100 | 
| TOTAL | 250 | 300 | 
 
					
				
		
Generally Targets are more likely Monthly or Yearly. In your file have both seems to be both are same. If you have different month & year targets you can load two targets separately in same tables.
// First Load the Monthly Targets.
MonthTargets:
LOAD
SalePerson & '|' &MonthStart(Date) AS %Key_TargetMonthly,
Target_Month
From TargetFile;
YearTargets:
LOAD
SalePerson & '|' &YearStart(Date) AS %Key_TargetYearly,
Target_Year
From TargetFile;
Create the %Key_TargetMonthly & %Key_TargetYearly in you fact table with same functions.
Please note that, year targets on Year level & Month target on Month level.
