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

set expression

Hi Friends

I have created a varibale and want to insert the same in an expresiion

My expression is ({<HOUR_GROUP-={NR}>}$(vPerClaim)) but It is not working. Kidly correct If I am wrong

Thanks

10 Replies
vishsaggi
Champion III
Champion III

May be try this:

({<HOUR_GROUP-={'NR'}>}$(vPerClaim))

upaliwije
Creator II
Creator II
Author

Not working.

My Problem is if I wite the expression withot a vraivle it workig

eg:  sum({<HOUR_GROUP-={NR}>}amount)

swuehl
MVP
MVP

What's the definition of your variable?

You can put your expression including the variable in an expression in a straight table and leave the expression label empty, then hover with the mouse over the expression header of the table chart.

It should show your expresssion with the dollar sign expansions expanded. Check if the result is like expected (i.e. variable replaced to your field name).

upaliwije
Creator II
Creator II
Author

Thanks

my varible is floows

sum(rangesum(CL_PROV,+CL_ADJUS,-RE_PROV-RF_PROV))-SUM({<CLAIM_NO={'MOTOR SALVAGE LOT'}>}SALVAGE)

If I put this varible in thos way $(vPerClaim) it is working. But when I try couple with set modifier

{<HOUR_GROUP-={NR}>} it does not work

vishsaggi
Champion III
Champion III

Try what setfan suggested and let us know if you still face the same. Please send us a sample app that defines the problem.

upaliwije
Creator II
Creator II
Author

I have tried still the same result

Clever_Anjos
Employee
Employee

You can´t have a sum inside another sum without an AGGR()

Your variable return a sum() that is inner to a sum()

Usefull reading: Pitfalls of the Aggr function

upaliwije
Creator II
Creator II
Author

Thanks

Can you pls rewtite my Variable to help me

swuehl
MVP
MVP

You would need to add the set modifier to a set expression in each aggregation function you want it to apply to:

sum({<HOUR_GROUP-={NR}>} rangesum(CL_PROV,+CL_ADJUS,-RE_PROV-RF_PROV))

-SUM({<CLAIM_NO={'MOTOR SALVAGE LOT'}, HOUR_GROUP-={NR}>}SALVAGE)