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

Conditional Expression

Hi everyone!

I have this table:

   

Order noS_QA_Q
A100125
B200199
C300280
D4000
E0500
F600400
G550550

I would like to show the difference between S_Q and A_Q that greater than 5% or less than -5%, the answer should be like these:

    

Order noS_QA_QDiff%diff
A1001252520%
C300280-20-7%
E0500500100%
F600400-200-50%

what is the expression?

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

And may be this to should only difference above 5% and below -5%

If(fabs((A_Q - S_Q)/A_Q) > 0.05, (A_Q - S_Q)/A_Q)

View solution in original post

12 Replies
surendraj
Specialist
Specialist

May be!!

S_Q - A_Q/A-Q

sunny_talwar
MVP
MVP

Should it be this

(A_Q - S_Q)/A_Q

MK9885
Master II
Master II

S_Q-A_Q as Diff in expression

Diff/A-Q as %diff in expression

sunny_talwar
MVP
MVP

And may be this to should only difference above 5% and below -5%

If(fabs((A_Q - S_Q)/A_Q) > 0.05, (A_Q - S_Q)/A_Q)

Anonymous
Not applicable
Author

Hi Sunny Talwar

no it does not work!

It shows the all data but I want to show only the differences which are obey the condition.

Anonymous
Not applicable
Author

Hi again!

It works; the only task to do is that it shows all data and in this situation I would not like to show the B,D and G.

who we can do it?

sunny_talwar
MVP
MVP

Isn't that we are seeing?

Capture.PNG

Anonymous
Not applicable
Author

Dear Sunny Talwar

I appreciate you.

Anonymous
Not applicable
Author

Hi Sunny Talwar

Can you look at this?

  

Order no(A_Q - S_Q)If(fabs((A_Q - S_Q)/A_Q) > 0.05, (A_Q - S_Q)/A_Q)
--
A2520.00%
B-1-
C-20-7.14%
D-400-
E500100.00%
F-200-50.00%

How to remove columns B AND D?