Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

URGENT:specifying dimension value in first row irrespective of the condition in qlikview table

Hi,

I have requirement where I need to add one dimension value to the first row of the table irrespective of the condition.

Here I am using rank condition for getting top 5 values say Val1,Val2,Val3,Val4,Val5 for particular dimension. i need to show one dimension value like TestValue in the first row irrespective of its rank and then followed by top 5 values

   

Dimension1Rank
TestValueRank(TestValue)
Val11
Val22
Val33
Val44
Val55
22 Replies
Not applicable
Author

Can I give like this PICK(DIM,sum(Value),SUM(Value))

I had given the same but values didn't change.

IS there any particular format?

vinieme12
Champion III
Champion III

can you post your sample?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

In the above qvd I created 2 tables one is using dual function and one without dual function and h value

vinieme12
Champion III
Champion III

You can't use Relative , because we are forcing in a Dummy dimension value

You need to evaluate it properly in the expression as below

sum(Value)/sum(TOTAL Value)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

See attached updated app

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Thank You Soo much

Not applicable
Author

Hi Vineeth,

I am getting correct result for some filter selection. For some filter selections if h value is already in top 5,it is skipping the h value and showing remaining vendor values

so for some filter selections ,vendor value 'h' will be in top 5 and for some selections it will be below top5.Current logic is working for h value below top 5 .I should get combination of both h value in top 5 as well as h value without top 5

I added file where I change the h value as that comes in top5

Many thanks for your help

vinieme12
Champion III
Champion III

ok, let's try a simpler approach and remove the calculated dummy dimension

Check attached app, specifically the Sort Expression

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

It is giving same result as what I used earlier.I mean before posting in the forum. Thanks for the help and giving me suggestion for one more approach.


Here also I am seeing one issue

Rank(sum({<Vendor={"=rank(Value)<=4"}>+<Vendor={'h'}>}Value),1,0)


I want to restrict the table to top 5 rows,when the h vendor is present in top 5 list,I am seeing only top 5 row values in the table.

but when the h value is not in top 5 for some filter selections, h value along with top 5 are coming.In that scenario,My requirement is h value + top 4



vinieme12
Champion III
Champion III

ok, then add that as a condition like below

if(Rank(Sum({<Vendor={'h'}>}Value),1,0)>5                            //if rank of H is > 5

,Rank(sum({<Vendor={"=rank(Value)<=4"}>+<Vendor={'h'}>}Value),1,0)       //then show H + remaining top 4

,Rank(sum({<Vendor={"=rank(Value)<=5"}>}Value),1,0)                                  // else show Top 5 including H

)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.