Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

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);

1 Solution

Accepted Solutions
Qrishna
Master
Master

You can use set analysis using only() function.

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

in your case.:

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

if you use this as dimension in any chart then:

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

edit:

Capture1.PNG

hope that helps

Thanks

krishna

View solution in original post

10 Replies
kkkumar82
Specialist III
Specialist III

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

Thanks

Kiran Kumar

markgraham123
Specialist
Specialist
Author

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

kkkumar82
Specialist III
Specialist III

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

KK

sasiparupudi1
Master III
Master III

you can not use set analysis on naked fields

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

hth

Sasi

markgraham123
Specialist
Specialist
Author

Sorry,

in chart.

kkkumar82
Specialist III
Specialist III

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

Qrishna
Master
Master

You can use set analysis using only() function.

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

in your case.:

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

if you use this as dimension in any chart then:

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

edit:

Capture1.PNG

hope that helps

Thanks

krishna

Qrishna
Master
Master

Any Luck?

markgraham123
Specialist
Specialist
Author

Hi Krishna,

Thanq verymuch.

Actually, i did the same using "Only"

It worked.