Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sanjujeeboy
Creator
Creator

Fix a field value in table in qliksense

I have field called Manufacturer which has 10 value. I want to display top 5 manufacturer with highest sales. 

Note: i want to always display One of the Manufacturer say 'A' even when its not in top 5.

how to achieve this?

Thanks

 

Labels (1)
1 Solution

Accepted Solutions
anushree1
Specialist II
Specialist II

The Expression Shared before works in this case,

Please check the attached

View solution in original post

5 Replies
anushree1
Specialist II
Specialist II

You could try the below:

if(Manufacturer='A', Sum(Sales),if(rank(sum(Sales))<=5,Sum(Sales)))

If it does'nt work, suggest you to please share the sample, so that the expression precise to your requirement could be arrived at

sanjujeeboy
Creator
Creator
Author

 

 

Category1  Category2 
ManufacturerSales ManufacturerSales
A336,816,962.51 J406,199,718.03
B154,258,917.87 K212,925,784.02
C108,858,772.13 L179,148,685.85
D94,400,050.27 M107,715,118.70
E88,844,093.62 N88,768,449.43
F44,288,516.00 O82,250,864.92
G23,302,880.33 P70,205,085.82
H16,221,118.66 Q69,911,473.04
I9,508,814.67 R66,120,828.65
   S50,454,783.42
   T46,787,536.58
   U45,965,061.22
   A43,923,497.42
   V38,230,670.09

 

when sales sorted in decreasing order, If Manufacturer A is present in Top 5 , then display as it is,

if Manufacturer A  not present in top 5 then display Top 5 as well as Manufacturer A numbers

Thanks.

 

 

anushree1
Specialist II
Specialist II

The Expression Shared before works in this case,

Please check the attached

sanjujeeboy
Creator
Creator
Author

with reference to qvf you have shared,can you show the output in 1st table itself instead of creating two tables.

sanjujeeboy
Creator
Creator
Author

Hi

This solution worked.

Thanks.