Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 raadwiptec
		
			raadwiptec
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi qll,
I have 2 files from where I am picking the data
1. current file
2.history file
for ex
current file
customerid ¦ date ¦ Amount invoiced
1 25-sep 2500.
history file
customerid ¦ date ¦ Amount invoiced
1 20-sep 1500.
I need both data but I do not want to sum of amount invoiced
 
					
				
		
 bohravanraj
		
			bohravanraj
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am unable to understand your Question.
please can you Elaborate bit more or share a case in QVW.
Regards
 
					
				
		
 pooja_sn
		
			pooja_sn
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am not very clear about your question but I think you can add a new field while loading data to discriminate between historical and current file data.
 
					
				
		
 alexandros17
		
			alexandros17
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		A solution could be something like this:
Loading the files use a flag
so:
Current:
LOAD *, 'Current' as Flag From ....;
History:
LOAD *, 'History' as Flag From ....;
When you show data you will have all informations but if you need only sum from current write:
Sum({$ <Flag={'Current'}>} Value)
Let me know
 
					
				
		
 jagan
		
			jagan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HI,
Duplicate thread duplicate. Don't create duplicate threads it is difficult to follow.
Is that solution not working?
LOAD
*,
1 AS NewFlag
FROM DataSource;
Now in set analysis use
=Sum({<NewFlag={1}>} Amount)
Hope this helps you.
Regards,
jagan.
 engishfaque
		
			engishfaque
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear Raadwiptec,
Here is the solution with script and expression,
Expression 1: Sum of Amount for History Table record
--------------------
=Sum ({<Flag_History_Record = {1}>} Amount)
Expression 2: Sum of Amount for Current Table record
--------------------
=Sum ({<Flag_History_Record -= {1}>} Amount)
Data Model:
--------------------
[Current File]:
Load
customerid,
date,
Amount,
invoiced
From YourCurrentTable;
Concatenate ([Current File])
Load
customerid,
date,
Amount,
invoiced,
1 as Flag_History_Record
From YourHistoryTable;
Kind regards,
Ishfaque Ahmed
