Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Qlik Sense Cookbook. - Second Edition

You're reading from  Qlik Sense Cookbook. - Second Edition

Product type Book
Published in Aug 2018
Publisher Packt
ISBN-13 9781788997058
Pages 334 pages
Edition 2nd Edition
Languages
Authors (3):
Pablo Labbe Pablo Labbe
Profile icon Pablo Labbe
Philip Hand Philip Hand
Profile icon Philip Hand
Neeraj Kharpate Neeraj Kharpate
Profile icon Neeraj Kharpate
View More author details

Table of Contents (16) Chapters

Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Getting Started with the Data Visualizations Scripting Managing Apps and the User Interface Useful Functions Set Analysis Using Extensions in Qlik Sense Advanced Aggregation with AGGR Tips and Tricks Other Books You May Enjoy Index

Creating dynamic charts


To increase the flexibility of a single chart object, you can set it up so that the dimension used is based on what the user wants to see. This is a much more efficient use of space for single sheets, and makes the whole experience much more dynamic.

Getting ready

For the purpose of this recipe, we will make use of the sales information for different fruits, as defined in the script:

  1. Create a new Qlik Sense application and call it QS_DynamicCharts.
  2. Load the following data into the Data load editor:
Transactions: 
Load  
 Mod(IterNo(),26)+1 AS Period, 
 Pick(Ceil(3*Rand()),'Standard','Premium','Discount') AS 
   ProductType, 
 Pick(Ceil(6*Rand()),'Apple','Orange','Cherry','Plum','Fig', 
   'Pear') AS Category, 
 Pick(Ceil(3*Rand()),'Heavy','Medium','Light') AS Weight, 
 Pick(Ceil(2*Rand()),'2013','2014') AS Year,  
 Round(1000*Rand()*Rand()*Rand()) AS Sales 
Autogenerate 20 
While Rand()<=0.5 or IterNo()=1; 
 
SET vDimension = 'GetFieldSelections(Dimensions)'; 
 
Dimensions...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}