This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
With the below table. I want to calculate top 2 companies base on the sum of sales. Can some please help me with the logic.
Company : =If(Aggr(VRank(TOTAL Sum(Amount),0,1)<=2,Company,Year),Company)
View solution in original post
Try this as dimension
=aggr ( if ( rank(Sum( Amount)) <=2,Company) , Company )
And this as expression
On the Dimension untick Include Null Values
Thanks for looking into this. But this expression is not giving me the right result. Maybe I did not share right information.
With the expression, you shared I got the result below.
But the Output I want to see the TOP 2 sales amount is.
This I have achieved by using Spotfire. But I am facing some challenges while migrating the same to QLIK.
This is for TOP 5:
rank(total aggr(sum(Amount), Year, Company)) <= 2,
One solution i can think now would be to concatenate year and company field in the load script and use the below condition for all the dimensions and expression
Please find the sample document as attachment.
Thanks it worked as expected.
Thanks for your help!!
Thank you for looking into this.