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.
For the purpose of this recipe, we will make use of the sales information for different fruits, as defined in the script:
- Create a new Qlik Sense application and call it
QS_DynamicCharts
. - 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...