Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis

Hi Qlicker

I want to write the same condition in set Analysis..

Count(DISTINCT(if([%Indent status code]='K' and not(IsNull([PR No])) and IsNull([PO No]) ,[%Indent Line Number])))

Thanks in Advance.....

8 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

To select Not(isNull([PR No])), use the phrase [PR No] = {'*'}.

For the rest of the expression, see my answer to your previous post on a related query: http://community.qlik.com/thread/121390

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MK_QSL
MVP
MVP

Count({<[%Indent status code] = {'K'}, [PR No] = {"=Len(Trim( [PR No]))<>0"}, [PO No] = {"=Len(Trim( [PO No]))=0"}>}DISTINCT [%Indent Line Number])

Anonymous
Not applicable
Author

Hi Manish,

I used your condition but it showing the Error. Means i'm not getting the desired output...

tresesco
MVP
MVP

Note: if you are using this expression in a chart with dimensions and expecting this expression to filter data row-wise, it would NOT. Set anaysis filters data once for an object. For that, IF is the solution.

Anonymous
Not applicable
Author

Hi Tresesco,

Thanks for your suggestion, Mostly I'm preferred to IF condition only. But it was the requirement so I'm changing to Set analysis...

tresesco
MVP
MVP

Set analysis should be preferred, because it is faster. But if the expression is meant for filtering data row-wise in the chart, you can't get that using set analysis. Hope it is clearer now.

Anonymous
Not applicable
Author

OK  Thank you .....

Not applicable
Author

Hi Venkata, This will work when a selection is done.

=aggr(if(not IsNull(pr) and IsNull(po),Count({<indent = {'K'}>} total indentlinenumber)),pr,po)