Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi All,
I have a table where data will be like

But i want my data to be like
Location Num Week Sales
3013 week1 2448
3013 week2 2513
3020 week1 3957
3020 week2 3673
And so, on .I have attached my QVW. Can someone help me with any suggestions ?
Thanks
 
					
				
		
 gmoraleswit
		
			gmoraleswit
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Please see attached file
 
					
				
		
 gmoraleswit
		
			gmoraleswit
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Store the calendar table in a qvd:
store Calendar into Calendar.qvd;
DROP Table Calendar;
Calendar:
LOAD *,
num(FiscalYearId & num(FiscalMonthOfYearId,'00') & num(FiscalWeekOfMonthId,'00')) as key
FROM
Calendar.qvd
(qvd);

 
					
				
		
 gmoraleswit
		
			gmoraleswit
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
What you need is a dimension "week" that has "week1" and "week2" as fields
Then make your pivot table with "location num" and "week" as dimensions, and then use "sales" as your expression.
Or you could use a cross table, there are just different options
 
					
				
		
Find the attached document
 
					
				
		
Just drag the Week column from the column section to the rows. Hope it helps you.

 
					
				
		
Can you try something like this in your load script.
LOAD D AS LocationNum,
BR AS Week1,
BS AS Week2,
BT AS Week3,
BU AS Week4,
BV AS Week5,
IF (BR = Week1,'1',
IF (BS=Week2,'2',
IF (BT = Week3, '3',
IF (BU = Week4,'4',
IF (BV = Week5,'5'))))) as week
from xyz;
 
					
				
		
Try
LOAD D AS LocationNum,
BR AS Week1,
BS AS Week2,
BT AS Week3,
BU AS Week4,
BV AS Week5,
IF (BR = 'Week1','1',
IF (BS='Week2','2',
IF (BT = 'Week3', '3',
IF (BU = 'Week4','4',
IF (BV = 'Week5','5'))))) as week
 
					
				
		
post your qvw here
 dmac1971
		
			dmac1971
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yep drag and drop is all that is needed here.
 
					
				
		
 lironbaram
		
			lironbaram
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi
have a look at the attach example
