Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
I am unable to understand your Question.
please can you Elaborate bit more or share a case in QVW.
Regards
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.
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
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.
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