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: 
chaiwaykeat
Contributor II
Contributor II

Expression to find out Distinct value

Hi All,

I am trying to pull the value from [Backlog_Actual (2).backlogamt] given that  to [Backlog_Actual (2).SO] is equal to [Sales Order] in the below expression:

sum ( if ([Backlog_Actual (2).SO]= [Sales Order],[Backlog_Actual (2).backlogamt]))

But by doing this I have duplicated value pulled from [Backlog_Actual (2).backlogamt] as my [Sales Order] contains duplicate values.

How can I avoid pulling the duplicated values ?

Thanks !

2 Replies
tresB
Champion III
Champion III

Try like:

sum (Distinct  if ([Backlog_Actual (2).SO]= [Sales Order],[Backlog_Actual (2).backlogamt]))

chaiwaykeat
Contributor II
Contributor II
Author

by adding distinct the expression only pull out distinct value for [Backlog_Actual (2).backlogamt]

I will need distinct value for [Sales Order] when comparing it with [Backlog_Actual (2).SO]