Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Cyriltra
Contributor
Contributor

Use variable as part of Dimension name

Hello,

i have a data source with several metrics named as followed:

WF Sales

LF Sales

LP Sales

WF inventory

LF inventory

LP inventory

etc.

I would like the user to be able to select the period (WF, LF or LP) and the chart will display the right metric.

I've already set up the variable vPeriod that stores the period selected by the user (from a listbox selection); it's working fine.

But i'm now blocking on how to use the variable in the expression: a basic expression would be =sum([WF Sales]), how do i transform it to use my variable (so WF,LF or LP can dynamically change according to user input) ?

Thank you

 

Labels (2)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

sum([$(period) Sales])

View solution in original post

2 Replies
hic
Former Employee
Former Employee

sum([$(period) Sales])

Cyriltra
Contributor
Contributor
Author

simple, elegant, thank you !