on 2022 May 25 7:14 AM
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?
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Can you provide screenshots of your join in the query? Are records being duplicated because of left outer join?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
11 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.