Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hamzabob1
Partner - Contributor III
Partner - Contributor III

How to display bottom 4 using set Analysis??

Hello folks,

I am trying to display bottom 4 names using set analysis(expression) but i have more than 4 names with the same value.It display all the names with the same value.

I am attaching the application.

I need 2 outputs:

For Eg:ABCD.PNG1)Just show 4 names from the names having  value 100.

and

2)Show only one name from the similar ones and other 3 from the rest i.e 100,200,300 & 400.

 

Thanks & Regards

 

7 Replies
miskinmaz
Creator III
Creator III

You can try with advance set analysis like below

sum( {$<Customer = {“=Sum({1<Year = {2007}>} Sales ) > 1000000”}>} Sales )

instead of the Sum({1<Year = {2007}>} Sales expression you can use rank expression to rank the names.

hamzabob1
Partner - Contributor III
Partner - Contributor III
Author

thanks for your reply but it's not working.

anyone plzzz help.

Channa
Specialist III
Specialist III

=If(Aggr(Rank(-Sum(value)),COUNTRY_NAME_EN)<=4,COUNTRY_NAME_EN)

 

try to use this as ur dimension,replace Country and Value as ur dimension and measure

and measure sum(value)

Channa
hamzabob1
Partner - Contributor III
Partner - Contributor III
Author

Thanks but i want to do it using expression only.The expression you've suggested doesnt work.

Channa
Specialist III
Specialist III

You need to use that expression as your dimension

Measure : sum(value)

That will bring bottom 4 dimension value
Channa
hamzabob1
Partner - Contributor III
Partner - Contributor III
Author

hii channa,

 

i have tried in dimension as well but its not working u can check your own expression in the given qvf.

and i need to do that in expression only please try something else.

 

Thanks in advance.

Channa
Specialist III
Specialist III

=If(Aggr(Rank(-Sum(Sales)),Name)<=4,Name)

 

 

 

try hear for dense_rank

https://community.qlik.com/t5/QlikView-App-Development/Dense-Rank/td-p/290273

 

 

Channa