10 Replies Latest reply: Aug 31, 2015 3:06 PM by Krishna Nagulapally

# Set analysis without any aggregation

Hi all,

I'm a new learner in QlikView.

I was curious to know whether we can use Set analysis even sum/count/avg...etc functions were not used??

If so, can someone help me with a set analysis statement for:

If(ID='1', Name);

• ###### Re: Set analysis without any aggregation

Is this you want in a dimension or measure, let explain a little bit ur requirement, if possible with sample data.

Thanks

Kiran Kumar

• ###### Re: Set analysis without any aggregation

I was trying to do it in front end.

Simple If Statement

ID Name

1    A

2   B

3  C

If(ID='1', Name);

O/P: A

• ###### Re: Set analysis without any aggregation

you can not use set analysis on naked fields

it must be used in aggregations like sum/avg/count etc

hth

Sasi

• ###### Re: Set analysis without any aggregation

I think you didn't catch me , where u want to have this if condition in a chart or text box ??

KK

• ###### Re: Set analysis without any aggregation

Sorry,

in chart.

• ###### Re: Set analysis without any aggregation

Hi Graham,

For charts we can have calculated dimensions , there you can use such things but as Sasidhar told you cannot have a if condition for an expression but you can have like this

Sum(if(D='A', Value))

Please come up with some more data so that we can reach you.

Thanks

Kiran Kumar

• ###### Re: Set analysis without any aggregation

You can use set analysis using only() function.

only() is the only non-aggregate function where set analysis can be used.

Only({\$<ID={'1'}>}Name)

if you use this as dimension in any chart then:

aggr(Only({\$<ID={'1'}>}Name),ListOfOtherDimensions)

edit:

hope that helps

Thanks

krishna

• ###### Re: Set analysis without any aggregation

Any Luck?

• ###### Re: Set analysis without any aggregation

Hi Krishna,

Thanq verymuch.

Actually, i did the same using "Only"

It worked.

• ###### Re: Set analysis without any aggregation

Awesome.happy Qliking.