Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Any help is highly appreciated.
Thanks,
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.
Cheers,
Chris.
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.
Cheers,
Chris.
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,