Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

replace parameter in set analysis

Hi!

I'm loading a fair amount of expressions to calculate stuff. However, the expressions are quite the same with just a parameter different. How to create a 'standard' expression and then in my chart supply the parameter?

This is what I have:

vBelopp_a=sum({$<Region_own={[ON-US]},PosEntryDesc={Annat}>}Transbelopp) vBelopp_c=sum({$<Region_own={[ON-US]},PosEntryDesc={Chip}>}Transbelopp)

I would like to write:

vBelopp=sum({$<Region_own={[ON-US]},PosEntryDesc={$1}>}Transbelopp)

and then supply the parameter in chart like:

$(vBelopp('{Annat}'))

$(vBelopp('{Chip}'))

I can't get the syntax right (if it's possible to do like this...).

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Thanks Celambarasan, but no. But it got me continue and this is how you do it:

The variable:

sum({$<Region_own={[ON-US]},PosEntryDesc={$1}>}Transbelopp)

The expression:

$(vBeloppRegion_annat('Annat'))

Extend with more parameters:

The variable:

sum({$<Region_own={$2},PosEntryDesc={$1}>}Transbelopp)

The expression:

$(vBeloppRegion_annat('Annat','ON-US'))

View solution in original post

2 Replies
CELAMBARASAN

Hi,

     Try with  this

     vBelopp=sum({$<Region_own={[ON-US]},PosEntryDesc=$1>} Transbelopp)

Then use

$(vBelopp('{Annat}'))
$(vBelopp('{Chip}'))

Celambarasan

Not applicable
Author

Thanks Celambarasan, but no. But it got me continue and this is how you do it:

The variable:

sum({$<Region_own={[ON-US]},PosEntryDesc={$1}>}Transbelopp)

The expression:

$(vBeloppRegion_annat('Annat'))

Extend with more parameters:

The variable:

sum({$<Region_own={$2},PosEntryDesc={$1}>}Transbelopp)

The expression:

$(vBeloppRegion_annat('Annat','ON-US'))

View solution in original post