Showing results for 
Search instead for 
Did you mean: 

SAP BODS - Sum of Records Group By

0 Kudos

Hi All,

I have a Table with 10 Columns

I need to Sum 2 Columns using Grouping on 4 Columns.

I am Trying to achieve this by Query Transform

Step 1: Taken 6 columns into a New Query and applied Group By under GROUP BY tab for 4 columns and in the Mapping added aggregate function SUM() for that particular 2 columns - its working fine and getting record count as expected.

Step 2: Now I joined Queries (the Source Query and SUM query) to the next Query with a Join condition in WHERE tab

Now here its failing to filter the Records.

Source : 10 Records, after GROUP BY 6 Records

OUTPUT: I am getting More than 10 Records instead of getting 6 Records

I tried Is_Group_Changed(4 columns) in the 10 Columns Query Transform.

Its giving results more than Count of Query that doing SUM().

When I used JOIN using Is_Group_Changed and Dummy column with 1 as the Mapping value in SUM Query. Its giving wrong count of records.

is there any way to achieve this?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Can you provide screenshots of your join in the query? Are records being duplicated because of left outer join?