Skip to content

Instantly share code, notes, and snippets.

@boristyukin
Last active August 29, 2015 14:15
Show Gist options
  • Save boristyukin/40e4b05adcdd18c11a32 to your computer and use it in GitHub Desktop.
Save boristyukin/40e4b05adcdd18c11a32 to your computer and use it in GitHub Desktop.
QlikView implementation of dynamic charts (trends), driven by user selection
Dimension Expression (Primary and Secondary)
------------------------------------------------
= $(='['&only(%TrendDimensionName)&']')
= $(='['&only(%TrendDimensionNameSecondary)&']')
Dimension Label
------------------------------------------------
=%TrendDimensionName
Metric Expression
------------------------------------------------
=num($(=Only(TrendMetricExpression)),Only(TrendMetricFormat))
Metric Label
------------------------------------------------
=Only(%TrendMetricName)
Conditional Show:
------------------------------------------------
GetSelectedCount(%TrendMetricName)=1 and GetSelectedCount(%TrendDimensionNameUserLabel)=1 and GetSelectedCount(%TrendDimensionNameUserLabelSecondary)=1 and GetSelectedCount($(='[' & only(%TrendDimensionNameSecondary) &']')) >=1
Sheet Trigger to set defaults
------------------------------------------------
Select in Field %TrendMetricName to =if(GetSelectedCount(%TrendMetricName)=0,'Charges', only(%TrendMetricName) )
Select in Field %TrendDimensionNameUserLabel to =if(GetSelectedCount(%TrendDimensionNameUserLabel)=0,'Month', only(%TrendDimensionNameUserLabel) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment