Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Variables to Limit Result in Straight Table

Hello, I'm fairly new to QV and am running into an issue limiting results in a straight table. I have a set of transaction records that I need to be able to limit based on 2 fields.  I was thinking that I could use a variable to set the condition and then use that as input in the expression for my straight table. My set is for loan transaction data (each account can have many rtxn's) with a source code and action code (action code is dependent on source code) and loan type.  What I would like to do is exclude transactions where ((Sourcecode = 'I' and Actioncode = 'A') or Loantype = 'O'). I have tried creating a variable:

varInsAddOn = (Sourcecode = 'I' and Actioncode = 'A')

Then using the variable in an expression:

Not (varInsAddOn)

I don't think that I can use set analysis because (my understanding anyway) set analysis only applies to aggregate functions. As a workaround I created a list box for a selection and it isn't exactly what I was hoping for. Any ideas on how to use the variable?

Thanks,

Breanna

2 Replies
Anonymous
Not applicable
Author

Hi Breanna,

If you could post a small example qvw illustrating the problem I think you would get some quick responses with ideas on how to build what you're after. Maybe it's just that I haven't had my morning coffee but I'm not quite following..

Anonymous
Not applicable
Author

Hi,

   You can write formula directly in expression, as my understanding if you are writing a expression variable it will be take extra time for displaying a objects,

you can add expression in charts it'self.

supose you want write expression means

EX:

     sum(if(Sourcecode = 'I' and Actioncode = 'A') or Loantype = 'O',QTY))

Regards