Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Dimension1 | Rank |
TestValue | Rank(TestValue) |
Val1 | 1 |
Val2 | 2 |
Val3 | 3 |
Val4 | 4 |
Val5 | 5 |
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?
can you post your sample?
In the above qvd I created 2 tables one is using dual function and one without dual function and h value
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)
See attached updated app
Thank You Soo much
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
ok, let's try a simpler approach and remove the calculated dummy dimension
Check attached app, specifically the Sort Expression
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
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
)