Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gerrycastellino
Creator III
Creator 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
Gysbert_Wassenaar

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