Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

min($(variable))

Hi,

I have 4 pricing columns associated to a material

Is it possible to define a field name in a variable, and then use the variable in formulas

ie

vPrice = 1

vSalesPrice = 'SalePrice' & $(vPrice)

in reports,

sum($(vSalesPrice))

which would then return one of the 4 pricing columns, depending on the vPrice variable value?

Currently have 4 separate expressions, using a conditional show based off vPrice, but was hoping to combine to just the one expression

Please advise,

Kind regards,

Rich

1 Solution

Accepted Solutions
sunny_talwar

How about this:

Sum($(='SalePrice' & $(vPrice)))

View solution in original post

3 Replies
sunny_talwar

How about this:

Sum($(='SalePrice' & $(vPrice)))

Not applicable
Author

many thanks Sunny!

effinty2112
Master
Master

Hi richard,

          Have a go with:

=Sum([$(='SalesPrice' & '$(vPrice)')])

the square brackets are not necessary her but would be if you used this with a field name that has a space.

Cheers

Andrew