Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have Store And Sales tables
Store | Area |
---|---|
A | 100 |
B | 200 |
Store | Product | Price | Date |
---|---|---|---|
A | 1 | 1.25$ | 18/01/2016 |
A | 2 | 2.25$ | 19/01/2016 |
A | 3 | 3.25$ | 18/01/2016 |
B | 1 | 1.25$ | 19/01/2016 |
B | 2 | 2.25$ | 20/01/2016 |
Select * from Store, Sales where Store.Store= Sales.Store will Return
Area | Store | Product | Price | Date |
---|---|---|---|---|
100 | A | 1 | 1.25 | 18/01/2016 |
100 | A | 2 | 2.25 | 19/01/2016 |
100 | A | 3 | 3.25 | 18/01/2016 |
200 | B | 1 | 1.25 | 19/01/2016 |
200 | B | 2 | 2.25 | 20/01/2016 |
The Sum(Area) =700. How can i get Accurate Sum of Area in Qlikview?
How do we resolve this issue in Qlikview?
So intead of joining these two tables, you can keep them as separate tables, but connected on Store... Once you do that your Sum(Area) will give you 300 and there will be still an association between the two tables through Store field.
Srikanth,
You should normalize your table in this scenario. Maintain data in separate tables.
You've forgotten to tell us what the expected result is..
As long as you bring each table into your QlikView model individually - that is, select * from Store and select * from Sales (they will auto-join on Store because it is the same name in both tables), you should get 300 for sum(area). If you actually want 700, you need to pre-join the tables in your SQL, as you have in your example.
Hi Srikanth,
As sunny Talwar mentioned, use the attached QVW file for the reference, Hope it will provide the solution which is looking for you.
Regards,
Suresh Sindhigi.