Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
sakshi2106
Contributor
Contributor

SET ANALYSIS

I want to implement this code 

COUNT(DISTINCT {<SUBFIELD(FINAL_KEY,'|',1)=,PENDING_PR_FLAG={'1'}, [EBAN.EBAKZ]-={'X'}>}EBAN.BANFN&'|'&[EBAN.BNFPO])

 

But i am getting error. Please help

Labels (3)
1 Solution

Accepted Solutions
MayilVahanan

Hi Sakshi,

FYI: We can't use subField in the set analysis.

SUBFIELD(FINAL_KEY,'|',1)= <- Are you ignoring the selection from any field?  Suppose, if you are trying to exclude the Final_Key selection field, then you can simply use FINAL_KEY = in the expression.

I hope "FINAL_KEY" is combination key, and you need to ignore the selection of any one of the field, then use the original field name.. Or create new field in the data model and use it. 

COUNT(DISTINCT {<FieldName=,PENDING_PR_FLAG={'1'}, [EBAN.EBAKZ]-={'X'}>}EBAN.BANFN&'|'&[EBAN.BNFPO])

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
Delestia
Contributor II
Contributor II

Noticed a potential issues. Your - operator in the [EBAN.EBAKZ]-={'X'} expression is on the wrong side. Set modifier operations should come after the = sign. Try below:

COUNT(DISTINCT {<SUBFIELD(FINAL_KEY,'|',1)=,PENDING_PR_FLAG={'1'}, [EBAN.EBAKZ]=-{'X'}>}EBAN.BANFN&'|'&[EBAN.BNFPO])
sakshi2106
Contributor
Contributor
Author

Thanks for the reply but i am not getting error because of the - operator. The error is occurring because i am using subfield function.

 

agigliotti
Partner - Champion
Partner - Champion

you can't use the function Subfield in that way.

in your script you should create a new field as below:

SUBFIELD(FINAL_KEY,'|',1) as new_field

then you can use this expression:

=COUNT( {< new_field= , PENDING_PR_FLAG = {'1'}, [EBAN.EBAKZ] -= {'X'} >} DISTINCT EBAN.BANFN & '|' & [EBAN.BNFPO] )

I hope it helps.

MayilVahanan

Hi Sakshi,

FYI: We can't use subField in the set analysis.

SUBFIELD(FINAL_KEY,'|',1)= <- Are you ignoring the selection from any field?  Suppose, if you are trying to exclude the Final_Key selection field, then you can simply use FINAL_KEY = in the expression.

I hope "FINAL_KEY" is combination key, and you need to ignore the selection of any one of the field, then use the original field name.. Or create new field in the data model and use it. 

COUNT(DISTINCT {<FieldName=,PENDING_PR_FLAG={'1'}, [EBAN.EBAKZ]-={'X'}>}EBAN.BANFN&'|'&[EBAN.BNFPO])

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.