Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
SR2
Contributor III
Contributor III

QlikSense Data modelling

Hello All,

I'm working on a QlikSense app which sources data from multiple views and dim tables created in SQL server. 

When I try to create a flat table I often encounter that few fields does not got with each other, i.e. one field will have a NULL value when other has a value and vice versa for the same id. 

E.g. the id 'Cash receipt gl date' and 'cash app gl date' value but 'Trans Due date' is null.

How, can I overcome this and create a table to have all non-nulls in one row. I want to calculate difference between cash receipt gl date and due date for each id.

 

SR2_0-1632408150547.png

 

Any help is highly appreciated.

Thanks,

 

 

1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

I think you should look at where the nulls are coming from in your data, so are they present in the SQL Server views, or is something in the load script creating these? Can you look at each view individually in a different app with no manipulation from Qlik script (if there is any)?

As a quick hack you could wrap the fields in Max function, so like below, but as I say I'd try to get to the bottom of why they are there, as you might find they pop up as a problem elsewhere in your data.

20210923_2.png

Cheers,

Chris.

View solution in original post

2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

I think you should look at where the nulls are coming from in your data, so are they present in the SQL Server views, or is something in the load script creating these? Can you look at each view individually in a different app with no manipulation from Qlik script (if there is any)?

As a quick hack you could wrap the fields in Max function, so like below, but as I say I'd try to get to the bottom of why they are there, as you might find they pop up as a problem elsewhere in your data.

20210923_2.png

Cheers,

Chris.

View solution in original post

SR2
Contributor III
Contributor III
Author

Hello,

Thank you so much for your reply.

Indeed, the load script concatenates 5 views into one table and has lot of overlapping field names which might be causing this. It look bit tedious to fix it as this behaviour might prevail for other fields as well. 

I will certainly have to fix this. Are there any guidelines which one should follow or keep in mind while merging views into one table to have better data model (if not best) 🙂

Thank you again for your help!

 

Best Regards,