Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
venkatasreekant
Valued Contributor

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
Highlighted
MVP
MVP

Re: Set Analysis

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
Highlighted
MVP
MVP

Re: Set Analysis

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

Highlighted
venkatasreekant
Valued Contributor

Re: Set Analysis

Hi Manish,

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

Highlighted
MVP
MVP

Re: Set Analysis

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.

Highlighted
venkatasreekant
Valued Contributor

Re: Set Analysis

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...

Highlighted
MVP
MVP

Re: Set Analysis

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.

Highlighted
venkatasreekant
Valued Contributor

Re: Set Analysis

OK  Thank you .....

Highlighted
Not applicable

Re: Set Analysis

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)