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

Using If Condition, the set analysis expression is not working

Hi,

In the below expression is not working because of exclution of -=, could you please any one suggest where its wrong.

=If(Title='Nb_Invo',Count({$<[Year]={$(PY)}, [Status]-={'A'}>}DISTINCT [Invoice Number]),

If(Title='Nb_Ship',Count([TransNo))

Regards

Chriss

Labels (1)
2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try adding a final ) at the end of your expression:

=If(Title='Nb_Invo',Count({$<[Year]={$(PY)}, [Status]-={'A'}>}DISTINCT [Invoice Number]),If(Title='Nb_Ship',Count([TransNo)))

The expression editor has a bug so -= will show a red underline. But the syntax is correct. If the expression doesn't calculate the correct result it's not because [Status]-={'A'} isn't the right syntax.


talk is cheap, supply exceeds demand
MayilVahanan
MVP
MVP

HI

If your  full expression is

=If(Title='Nb_Invo',Count({$<[Year]={$(PY)}, [Status]-={'A'}>}DISTINCT [Invoice Number]),

If(Title='Nb_Ship',Count([TransNo)) only means,

You didn't closed the if condition

=If(Title='Nb_Invo',Count({$<[Year]={$(PY)}, [Status]-={'A'}>}DISTINCT [Invoice Number]),

If(Title='Nb_Ship',Count([TransNo)))

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