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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
khadeer
Specialist
Specialist

Variable value?

Hi Everyone,

I have one variable which represents interest, Suppose it giving value for month selections as follows,

Apr- 30, May-40, June-50, July-10

My requirement is when i am selected may it will show total of Apr+May= 70, similarly if i selected june - 30+40+50= 120,

Here i want to add variable value,

I used this expression,

sum({$<Month={"<=$(=Month)"}>}$(Variable)

sum({$<Month={"<=$(=Month)"}>}$(Values)..... For this i am getting correct value. But when i am using same expression for variable, i am getting current selection.

i.e if selecte may, its showing May month value= 40, but i want to show 70

Labels (1)
14 Replies
sivarajs
Specialist II
Specialist II

try the below expression

rangesum(Above(total (sum({<Month={">=$(=max(Month)-count(above(Month)))<=$(=Max(Month))"}>} Amount)), 0,RowNo(TOTAL)) )

khadeer
Specialist
Specialist
Author

Hi Sivaraj,

Thanx for ur reply, I am gettibg same value as previous.

sivarajs
Specialist II
Specialist II

Chek this file

khadeer
Specialist
Specialist
Author

When i am using variable instead of  value i am not getting the result.

I dont want to show in a table, I want to show that value in text object.

sivarajs
Specialist II
Specialist II

may i know what $(Values) holds and how you are using? Possible leave a sample

khadeer
Specialist
Specialist
Author

=num(sum({$<Cus_ID={66010,66011,66012},Month={$(=min(Month))},BA={'XXX'}>}POB))

+(RangeSum(sum({<Cus_ID={66010,66011,66012},Month={$(=max(Month))},BA={'XXX'}>}Values))

+(num(sum({$<Cus_ID={66010,66011,66012},BA={'XXX'}>}POB))))/2

*0.1475*(VNoOfDaysMonth/365

This is my variable value.

Sorry i am unable to post my sample, I will try if its possible.  

khadeer
Specialist
Specialist
Author

Any Suggestions?

rlp
Creator
Creator

Shouldn't the end of expression be

*0.1475*$(VNoOfDaysMonth)/365

instead of

*0.1475*(VNoOfDaysMonth/365

?

Anonymous
Not applicable

Hi,

Please check the application.

Regards