Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vsap2000
Creator
Creator

How to filter on measure

Hello,

I have the table shown below and  need to build a field that filters the variance (measure) greater than 2000 or -2000

Prod Num      Prod Type     Prod Enter Dt     Order Num      Var Amt             Var Flag

00012                   P01              11/12/2020          O-231                 2000                         Yes

00013                  P02                10/21/2020           O-212               -1950                           No

00014               P01                   11/12/2020           O-234               -22000                         Yes

00015              P03                   09/0/2020              O-122                 550                            No

 

I want to build the column Var Flag where Var Amt is greater than 2000 doesn't matter if it is positive or negative. I used expression shown below but it doesn't work.

=If(VarType = 'V01' AND  Fabs([VarAmt]) > 2000,
  'Yes','No')

Thanks in advance.

-V

4 Replies
GaryGiles
Specialist
Specialist

What is in the VarType field?  It doesn't appear in your sample data.

vsap2000
Creator
Creator
Author

Hi,

Thanks for reply, VarType is type of variance to be used to calculate the VarAmt, that is a criteria needed for the expression.

 

-V

 

mazenbilto
Contributor II
Contributor II

Hello,

As Gary asked before does VarType exist in your data and you just forgot to include it in the sample? because if it doesnt exist as a field the if statement wont work as VarType does not exist.

vsap2000
Creator
Creator
Author

Hi,

Thanks for reply.

Yes, VarType field exist and as I said before just want to show result for only VarType = 04. Hope that clarifies.

 

Thanks,

-V