SELECT customer.No_ AS Customer_No, customer.Name AS Customer
LEFT JOIN (table)
SELECT s."Customer No_" AS Customer_No, s.Amount AS sales_Amount
FROM sales s;
LOAD * Resident table;
When I create a pivot table with dimension Customer_No and measure SUM(sales_Amount), every SUM result is doubled. I checked my SQL query in DBeaver, the result is correct. Why is it doubled from data load editor?
I suspect you have duplicate records in your customer table. You can comment on other tables in your data model and remove or comment on LEFT JOIN (table). The two tables will be associated using the Customer_No. Try your pivot table again.
The strange thing is when I do Count(Amount) directly in pivot table column 2, the result duplicates. But if I do COUNT(Amount) GROUP BY... in the script, result shown in column 3, I get the right answer. Any idea?