Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
brianrmacdonald
Contributor

Sankey Diagram, handling nulls

I am trying to develop a Sankey diagram in QlikSense for patient flow in a clinical trial.  I am using the extension here.

Here is a sample of my data.  This data does not work

MySankeyData:

LOAD * INLINE [

'Node1','Node2','Node3','MyCount'

'Screened','Enrolled','Completed','4'

'Screened','Enrolled','Discontinued','1'

'Screened','Enrolled','','1'

'Screened','','Failed','2'

];

The subject in the third line is still active and so I can easily enough enter 'Active' in node 3.  But I cannot handle the null in the fourth line.  I can transform the data to this....

MySankeyData:

LOAD * INLINE [

'Node1','Node2','Node3','MyCount'

'Screened','Enrolled','Completed','4'

'Screened','Enrolled','Discontinued','1'

'Screened','Enrolled','Active','1'

'Screened','null','Failed','2'

];

And this gives me the following diagram...

sankey.jpg

But the term 'null' in node 2 is obviously not what I want.

I have tried:

'Screened','','Failed','2'

'Screened',,'Failed','2'

'Screened','Failed','','2'  - (which would move the 'Failed' to the second node, not ideal but the diagram would have to terminate here to be meaningful and the null in node3 does not work)

etc,


So I am hoping someone can help me with how to handle the nulls.

As an aside, the Sankey diagrams for QlikView seem to operate effortlessly from a concatenated path flow.  Witness this video from Dalton Reuer (skip to 2:34 in the video).  But the Sense apps seem to require each node defined as a dimension.  Why is this?  Is there something I am doing wrong in my data prep?


Thanks in advance.



3 Replies
MVP & Luminary
MVP & Luminary

Re: Sankey Diagram, handling nulls

I'd replace the string 'null' with something like 'N/A' or 'unknown' or 'missing' or 'no data'. If you don't want that you can something like this:

set NullInterpret =;

MySankeyData:

LOAD * INLINE [

'Node1','Node2','Node3','MyCount'

'Screened','Enrolled','Completed','4'

'Screened','Enrolled','Discontinued','1'

'Screened','Enrolled','','1'

'Screened', ,'Failed','2'

];


talk is cheap, supply exceeds demand
hinaflexi
New Contributor

Re: Sankey Diagram, handling nulls

Hey, Did you get a solution to this problem? I am facing something similar and I would want that those null records should be shown moving directly to failed on level 3 from screenboard.

Kindly help if you have found the solution to it

brianrmacdonald
Contributor

Re: Sankey Diagram, handling nulls

I did not get a solution that was acceptable to me.  Gysbert's solution was the best I could do.  Its been a while since I looked at this so it is possible the projects for QlikSense has evolved a bit.