Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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);
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:
hope that helps
Thanks
krishna
Is this you want in a dimension or measure, let explain a little bit ur requirement, if possible with sample data.
Thanks
Kiran Kumar
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
I think you didn't catch me , where u want to have this if condition in a chart or text box ??
KK
you can not use set analysis on naked fields
it must be used in aggregations like sum/avg/count etc
hth
Sasi
Sorry,
in chart.
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
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:
hope that helps
Thanks
krishna
Any Luck?
Hi Krishna,
Thanq verymuch.
Actually, i did the same using "Only"
It worked.