Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Cyriltra
Contributor III
Contributor III

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 III
Contributor III
Author

simple, elegant, thank you !