Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Not applicable

Data Modeling

I have Store And Sales tables

StoreArea
A100
B200

Store

ProductPriceDate
A11.25$18/01/2016
A22.25$19/01/2016
A33.25$18/01/2016
B11.25$19/01/2016
B22.25$20/01/2016

Select * from Store, Sales  where Store.Store= Sales.Store will Return

AreaStoreProductPriceDate
100A11.2518/01/2016
100A22.2519/01/2016
100A33.2518/01/2016
200B11.2519/01/2016
200B22.2520/01/2016

The Sum(Area) =700. How can i get Accurate Sum of Area in Qlikview?

How do we resolve this issue in Qlikview?

Tags (1)
4 Replies
Highlighted

Re: Data Modeling

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.

Highlighted
laddu_927
Valued Contributor

Re: Data Modeling

Srikanth,

You should normalize your table in this scenario. Maintain data in separate tables.

Highlighted
Or
Valued Contributor II

Re: Data Modeling

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.

Highlighted
sureshsindhigi
New Contributor II

Re: Data Modeling

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.