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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
daisy1438
Contributor III
Contributor III

top 10 positive and negative values set expression?

Hi

I am using the below expression for calculating budget value.it having some positive and negative values.

Sum({<[Budget Type Code]={'Budget'}>}Expense)

now i need to find out the top 10 positives budget and top10 negative budget.

what is the set expression for this requirement?

 

thanks 

6 Replies
Channa
Specialist III
Specialist III


=aggr(if(rank(sum(CUSTOMS_VALUE_QAR))<=10 or rank(-sum(CUSTOMS_VALUE_QAR))<=10,COUNTRY_NAME_EN),COUNTRY_NAME_EN)

this is top 10 and bottom 10

 

Channa
pradosh_thakur
Master II
Master II

What is your dimension ? You want to see top 10 positive and negative budget for what exactly ? An example would help

 

@Channa  how did you figure out the field ? Unless i am missing something.

Learning never stops.
Channa
Specialist III
Specialist III

=IF(aggr(rank(sum(CUSTOMS_VALUE_QAR))<=10,COUNTRY_NAME_EN)=-1,'Top','Bottom')

 

this will do add new column

Channa
pradosh_thakur
Master II
Master II

@Channa  my question to you was not about the expression. I was asking  about CUSTOMS_VALUE_QAR  and COUNTRY_NAME_EN column . How did you find this column ? he has not mentioned it in the question.

Learning never stops.
Channa
Specialist III
Specialist III

expression should be dimension bro,

measure just add SUM(customs_value_qar)

Channa
pradosh_thakur
Master II
Master II

I guess you didn't understand my question. I was not asking you the answer, I was asking how did you know the field he has used ? He has not mentioned the field you have used anywhere in the question. 

 

Anyways that's fine.

Learning never stops.