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: 
upaliwije
Creator II
Creator II

Variable

Hi Friends

I have created a varaiable as shown below

vPaid=RangeSum({<CLA_CODE={"SS"}>},LBP_CLAIMS_PAID,-EXCESS)

But this does work. Have I made any error? Kindly advise me and correct me

9 Replies
upaliwije
Creator II
Creator II
Author

Sorry , This variable does not work

jonathandienst
Partner - Champion III
Partner - Champion III

RangeSum() is not an aggregation function that allows section access. I assume you mean Sum()


vPaid = Sum({<CLA_CODE={"SS"}>} LBP_CLAIMS_PAID - EXCESS)

or

vPaid = Sum({<CLA_CODE={"SS"}>} RangeSum(LBP_CLAIMS_PAID,  -EXCESS))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
tresesco
MVP
MVP

I assume you mean Set Analysis (and not section access), right?

upaliwije
Creator II
Creator II
Author

Thanks

I have done as you suggested. But when I enter the vairavle in pivot table It returns null value as shown below

Screenshot_3.png

upaliwije
Creator II
Creator II
Author

I want to create a variable "vPaid" and apply the same in an expression in apivot table

sum($(vPaid)

That is my requirement pls.

tresesco
MVP
MVP

Try without sum() in the expression, like:  =$(vPaid)

jonathandienst
Partner - Champion III
Partner - Champion III

You can't wrap a sum() around a variable that already contains a sum. Just use $(vPaid) as the chart expression without the sum() wrapper.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
upaliwije
Creator II
Creator II
Author

Thanks Dienst,

I works that way. But I want write a another expression as shown below

({<PRL_PTY_CODE={'INP'}>}$(vPaid)) Then It does not work Seek Your advise please.

jonathandienst
Partner - Champion III
Partner - Champion III

({<PRL_PTY_CODE={'INP'}>}$(vPaid)) ??


I dont know what you are trying to achieve. As a rule, I would not convert expressions to variables until I have got the expressions working correctly. Defining variables too early makes development more difficult.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein