Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When I load a table with identical records like:
Table: load * inline [ Name, Age Peter, 20 Peter, 20 Alice, 30 Alice, 30 ];
And I display the chart, with sum(Age) I get 40 for the 2 Peters and 60 for 2 Alices.
When I add the following script line
inner join (Table) load distinct Age resident Table where Age = 20;
I keep the records for Peter however sum(Age) is now 20 instead of 40.
I can workaround the issue when I add RowNo() to the table to make the records unique but I don't understand why Qlik behaves like this.
Can someone please explain?
Kind regards,
Peter
Hi Peter,
Solving your problem as an variant
Table:
LOAD Distinct*;
load * inline [
Name, Age
Peter, 20
Alice, 30
];
In your code, all the same lines are summed up, and function RowNo() makes each line unique.
Regards,
Andrey