I’ll put it in context for you. I can have several CNPJ (a type of registration) for each distributor CNPJ (as if it were the central registration). However, I need the result for the distributor and the CNPJ, so I put it in the aggregation manual as a sum and as a list, but it returns millions of lines, many even repeated. A duplicate row filter doesn’t seem ideal to me and I suspect the joiner made earlier, but which only had 2 equivalent columns and I used the 2 I could. When I do a groupby bringing only the result as a sum without being a list, it returns the expected amount before the joiner. Some help? Needed as a list to look at the CNPJ individually
Can you show us the original table + an example result? Because I do not really understand what you are attempting. In your last screenshot, RESULT_GROUP has type Double (D), but in your screenshot it is String (S).
Of course. below are the two tables, the columns that I use for the joiner in the next step and then the groupby that I use bringing the sell out as a sum (which returns by distributor and not by CNPJ PDV)
So you join the two tables first? Is each combination of distributor and CNPJ PDV unique? Otherwise you might get duplicates after the joiner, because it will create every possible combination from the matching rows in both tables. After that, you have many columns as Group columns in the GroupBy. Can’t you just use CNPJ PDV and Distribuidor there? That should give you the sum for each distributor and CNPJ PDV combination.
Hi @Cairo , in one of your screenshots you apear to be including
Sell In Q2'22 among your grouping columns but this looks to be a financial value so not something you’d normally group by.
Of course we can’t see your actual data so it could be that it only has one value for the combination of other grouping columns and you are just including it so that the value is returned but it seems a little strange.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.