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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concat for Top positions

Hi everybody,

I try to write a Concat-Function.
The formula works only when there is no formula in the IF-Query.

The SID's that have a rank <= ceil(count(distinct sid)*Top) must be connected with Concat-Formula.

Example:
Top = 25%

This Formula does not work
concat(if(aggr(rank(count(sid)),id,sid)<=ceil(count(distinct sid)*Top),sid),', ')

And it works
concat(if(aggr(rank(count(sid)),id,sid)<=3,sid),', ')


The IF-query must work with ceil(count(distinct sid)*Top) because I need it in a Chart.

Does anyone know the problem?

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Here the soloution:

concat(if(aggr(rank(count(sid)),id,sid)<=ceil( aggr( count(distinct total <id> sid),id,sid)*Top),sid),', ')

Thanks QlikTech Support (Mr. D. Big Smile)

View solution in original post

2 Replies
Not applicable
Author

This works well.

concat(if(aggr(rank(count(sid)),id,sid)<=$(=ceil(count(distinct sid)*Top),sid)),', ')

But if I write it this way, the top variable assigned only one value for all ID's.

Not applicable
Author

Here the soloution:

concat(if(aggr(rank(count(sid)),id,sid)<=ceil( aggr( count(distinct total <id> sid),id,sid)*Top),sid),', ')

Thanks QlikTech Support (Mr. D. Big Smile)