Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

gerrycastellino
Contributor III

how to pass in a parameter to variable

I have a  variable defined as below,  how do I replace the [s_DB_reg1]  which is a state with a parameter which will hold the state.

LET MA.SA.conf.expr.v.Tier1_Risk_Based_Capital_Ratio_Base_Num      ='sum({$<REGULATORY_SCENARIO={ "' &chr(36)&'(=only({[s_DB_reg1]} REGULATORY_SCENARIO))" }>} AMOUNT, 0))';

I've tried to replace as follows, but does not work - &chr(36)&'1  which will expand to $1


LET MA.SA.conf.expr.v.Tier1_Risk_Based_Capital_Ratio_Base_Num      ='sum({$<REGULATORY_SCENARIO={ "' &chr(36)&'(=only({

&chr(36)&'1} REGULATORY_SCENARIO))" }>}  AMOUNT, 0))';


I would call the variable as  $(MA.SA.conf.expr.v.Tier1_Risk_Based_Capital_Ratio_Base_Num ("[s_DB_reg1]") ??




1 Reply

Re: how to pass in a parameter to variable

Try:

LET MA.SA.conf.expr.v.Tier1_Risk_Based_Capital_Ratio_Base_Num ='sum({$<REGULATORY_SCENARIO={ "$'  & '(=only({$' & '1} REGULATORY_SCENARIO))" }>}  AMOUNT, 0))';


talk is cheap, supply exceeds demand
Community Browser