Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kmstephenson
Creator
Creator

allow users to select distinct observations for their selection - most recent, random, etc.

Hi All,

I'm working with healthcare data - specifically at the event (i.e. hospitalization) level. I would ideally like to make it up to the end user to decide how they want to view hospitalizations for patients with more than one hospitalization - i.e. should the dashboard show all hospitalizations, the most recent hospitalization, a randomly selected hospitalization etc. This is all dependent on any other selection made in the dashboard, so I can't just create flags in the script because a patient may have 5 hospitalizations, but only 3 qualify based on other selections made by the end user in the UI. Is there an easy way to allow end users to make this sort of decision in the UI? What would you recommend to tackle this problem of displaying a distinct observation per patient in different ways?

Thank you!!

8 Replies
kmstephenson
Creator
Creator
Author

Any thoughts?

Anonymous
Not applicable

Not catching your full requirement.  But may be you can try alternate states ?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You could code the various selection methods (all, latest, etc) as separate expressions with conditional enable based on user selections in an island field. Let me know if you need an example.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

kmstephenson
Creator
Creator
Author

An example would be great! Thanks, Rob!

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

kmstephenson
Creator
Creator
Author

Hi Rob,

Thank you for sharing!! This is a very interesting approach. My concern is that I'd like the user to be able to select all, most recent, earliest, etc. at a dashboard level..... and with the approach you shared, I would have to add multiple expressions and conditional logic to each and every chart throughout the dashboard - which I fear would hinder performance... Is this the only approach because of the need for the earliest, latest, etc. to change dynamically with the selections (hence, not being able to create flags in the script)?

Thanks!

kmstephenson
Creator
Creator
Author

Hi Rob,

Following up on your suggestion.

With the approach you shared, I would have to add multiple expressions and conditional logic to each and every chart throughout the dashboard - which I fear would hinder performance... Is this the only approach because of the need for the earliest, latest, etc. to change dynamically with the selections (hence, not being able to create flags in the script)? Is there no other option to create a button to subset rows displayed from the master fact table, versus having to add conditional logic to all charts in the UI?

Thanks!

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't think it would impact performance -- the conditionally suppressed expressions would not be calculated.  I do see that it could be a pain to have to code all the variations in every chart.

An easier-to-maintain approach would be select the expression using a variable or an indirect field reference. Example of both attached.

See also:

How Not to Choose an Expression | Qlikview Cookbook

How to Choose an Expression | Qlikview Cookbook

-Rob

http://masterssummit.com

http://qlikviewcookbook.com