Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
Jennell_McIntire
Employee
Employee

I was recently working on a Qlik Sense app where the developer wanted to show some profile data based on the user’s selection.  The user was prompted to make a single selection in a field and once they did specific data for that selection would be displayed.  When I first looked at the image below, I thought that it may be confusing to the user if there is data in the profile before they have made a vendor selection.  As you can see in the image below, no selections have been made yet but there is data in most of the objects.

1.png

In some objects like the Spend Development line chart and the Contracts and Spend Radar tables, the data makes sense without a vendor selection – we are viewing the spend and contracts for all vendors.  But in some objects like the Last Transaction field, this does not make sense.  The last transaction date being displayed is across all vendors so it is just the latest transaction date among all the vendors.  You can also see that the Vendor Profile is null since one has not been selected yet.  So my thought to get around this was to modify the expressions being used for some of the objects.  For instance, for the Vendor Profile, instead of simply having the field name for the vendor name:

2.png

I modified the expression to use the GetSelectedCount() function to first determine if one selection has been made from the Vendor filter pane.  If one vendor has been selected, then I display the vendor name.  Otherwise, I display an empty string.  GetSelectedCount() is a chart function that returns the number of selected (green) values in a field.

3.png

So here is what the sheet looks like now without any selections.  The vendor fields like profile, entities, last transaction, spend development and office address are all blank since a single vendor has not been selected.  If multiple vendors were selected, these fields will remain blank since we only want to display that data for one vendor at a time.

4.png

Once a vendor is selected, the sheet looks like this:

5.png

The related data is displayed and it is clear to the user that they are viewing data for the selected vendor.  To me, it made more sense to show no data in these fields when a vendor had not been selected versus showing misleading or confusing data.

In this example, GetSelectedCount() was one way I could help prompt the user to make a selection.  Even though we have text on the page asking the user to select 1 vendor, we all know that sometimes users do not read the text on a page.  By removing the data that is displayed in some of the fields, it brings to the user’s attention that something is missing and that they may need to do something to view the data.  The GetSelectedCount() function works with the red text to prompt the user to do something.  There may be other ways of handling this in Qlik Sense – I would be curious to hear what techniques you have used.

Thanks,

Jennell

5 Comments