Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have three tables I want to set up, Student with an inner join to schools (each student has a school) and also left join to Address (each student may/may not have an address).
[Student$]:
LOAD * INLINE [
SchoolID, AddID, Name
1, 3, Paul Smith
2, 2, William Philp
3, 1, Mark Turner
4, 7, Simon Easton
5, 9, Lubo Moravcik];
//Inner Keep ([Student$])
[School$]:
LOAD * INLINE [
SchoolID, SchoolName
1, St Johns
2, St Pats
3, Our Ladys
4, Belgrove Academy ];
//Left Keep ([Student$])
[Home Address$]:
LOAD * INLINE [
AddID, AddressName, Country
1, London, England
2, Amsterdam, Holland
3, Paris, France];
As I understand it, qlik will automatically join tables with similar key cols using a full outer join (keeps commented out). When I look at individual tables I see all the rows I expect but when I compare fields from two tables I see the full outer join result.
If I then specify inner and left joins between tables in my script (remove comments in script) my multi table-field results look correct but my single table counts are wrong now. is there anything that can be done to get the best of both worlds
the example above is a representation of the type of things users will want to do and as I cant model the data further just now I am trying to evaluate if qlik will be a good tool for this project with this data as-is.
thankyou in advance.
Hi @slihp67
Welcome to the Qlik's world of associative joins data models, it takes a while to get used to its benefits; when we implement traditional SQL driven data models, they seem robust, everything it tight together, the relationships between entities enforce that the data represented by the model is complete, a great experience for the user.
Let's analyze the traditional SQL data model (second screenshot):
Associative data models:
New fields, dimensions or entities:
While researching for this reply I found these articles:
The learning curve to work with associative data models is not that big once we understand the value added by the way it integrates data and the flexibility stakeholders and endusers gain in return.
Hope this helps,
Arnaldo Sandoval
Qlik uses column-name driven association between your tables, so your tables presenting the data may look ugly with those holes, that is the traditional way of thinking working with conventional SQL data model, everything is normalized; now you should introduce your users with this extra information, you still can present your data nicely with the Include Nulls, but if your users become aware that the data model will be able to answer questions about students with incomplete attributes, they will start to ask new questions, and you will be able to provide the answers, because the data model may produce a table with students pending their school assignation or students missing their address; this is meaningful information for them, and they know the team able to resolve these issues, and believe me, it will be operations and no information technologies.
The Null handling (exclude or include them) add power to the data model, as it will be able to answer a broader range of questions, you only need to handle the nulls when building the dashboard.
With the Students-Schools association you will be able to answers these questions:
I hope this helps,