on 04-01-2011 10:33 AM
Hi,
I will be getting a file with report id and amount associated with it. The report Id may be repetitive. My requirement is to cumulatively add the amount associated with same report ids and store it in a target field.
Please let me know how I can achieve this.
Regards,
Sandhya
Hi Sandhya,
This should be easy to achieve with standard functions:
On the target amount field do the mapping as below
ReportID(context at root level)->Sort->SplitByValue(value change)->Queue1
Amount (context at root level) ->SortbyKey(on ReportID)->FormatByExample (with Queue1 ) ->Sum (each Context)->Target Amount field
Only do the context handling carefully depending on how the ReportID and Amount fields are arranged in the file structure hierarchy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I will be getting a file with report id and amount associated with it.
The file you will be getting is already in xml format or just a text file (e.g csv)? If it is the latter you need to use FCC(file content conversion) so that you can manipulate the contents using graphical mapping.
The report Id may be repetitive. My requirement is to cumulatively add the amount associated with same report ids and store it in a target field.
This can be achieved, but we need to know the xml structure first
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The report_id & amount are fields contained into the file? If yes, you can solve by using an UDF function in mapping.
Input all file raw to the UDF, sort by report_id, loop&break at change report_id event... then sum amount.
If the requirement is different, please explain better your request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.