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: 
Anonymous
Not applicable

Data Comparission

Hello All,

I have 2 columns.

Min_Diff                  Min_Target

36                           15

12                           15

38                           15

06                           15

The formula in the Expression is

=if(Minutes_Difference <= Target_Min, 'Pass', 'Fail') 

When i compare these 2 columns, the Result column is

Min_Diff                  Min_Target     Result

36                           15                    Pass

12                           15                    Pass

38                           15                    Pass

06                           15                    Pass

Expected Result is

Min_Diff                  Min_Target     Result

36                           15                    Fail

12                           15                    Pass

38                           15                    Fail

06                           15                    Pass

What is wrong with my expression? Thanks.

Labels (1)
3 Replies
m_woolf
Master II
Master II

Are the two fields in the same table?

What does your data model look like?

You have Min_Diff in your example, but Minutes_Difference in your expression.

Are Minutes_Difference and Min_Target numeric or strings?

Can you post a sample qvw showing the problem?

Anonymous
Not applicable
Author

Hello m w,

My apologies. It should be

=if(Min_Diff <= Min_Target, 'Pass', 'Fail')

They are both numeric.

Thank you.

m_woolf
Master II
Master II

Well you answered one of my questions.

If these fields are both in the same table, you can create a new Pass_Fail field in script:

=if(Min_Diff <= Min_Target, 'Pass', 'Fail') as Pass_Fail


If they aren't in the same table, What does your data model look like?

Can you post a sample qvw showing the problem?