Let’s say I have a grouped chart with two expressions, Sales and Costs. I like the look of this chart, but there’s more information that can be provided to tell a better story, such as Margin and Margin %. So how can I add the additional information without altering the look of my chart? Custom pop-up labels are an ideal solution in this case because they allow the designer to include additional metrics without creating an overwhelming, hard to digest visualization. Follow the steps outlined below to create your custom labels.
1. Create a chart and add dimension(s)
2. Create two expressions (Sales and Costs).
3. Go to the presentation tab and uncheck the Pop-up Labels checkbox. This is necessary otherwise you will end up with multiple sets of pop-ups.
4. Navigate back to the expressions tab and create a third expression. Enter the following code.
Notice that instead of formatting my currency amounts in the expression as part of the num function, I used the MoneyFormat variable. The MoneyFormat variable is one of the standard QlikView variables that is automatically generated when you first open the script editor. If you want to alter the format of the currency values, make the change in the script editor and reload the script.
5. With the new expression highlighted, perform the following tasks under Display Options:
- Uncheck the Bar checkbox
- Select the Text as Pop-up checkbox
The icon will change indicating that this new metric will not render with any bars.
Click Finish and now when the user hovers their cursor over a particular brand they will get custom pop-up labels providing Sales, Costs, Margin and Margin % information.
Hope this design tip comes in handy.
Free eBook Download
In the eBook “Having a Conversation with Data”, learn what the current BI infrastructure has been and associated challenges with the traditional approach. How important the user experience is in order to best maximize data’s value (think visualizations!!) to your organization and how to gain a competitive advantage with modern analytics platforms.