Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vishus913
Partner - Creator
Partner - Creator

how to choose the product having maximum sales and expense

hi everyone,

i have a table t with

product, sales and expense column, e.g

t:

Product, sales, expense

1          ,  20,          ,30

1          ,  40          ,30

2          ,20           ,25

now i want the name of the product whose expense is highest and is having the maximum sales....

can anyone suggest me a way to do this

thanks

Vikas

13 Replies
vishus913
Partner - Creator
Partner - Creator
Author

in that case i would like to see the both

sunny_talwar

May be this

Concat(DISTINCT {<Product = {"=Rank(Sum(Expense)) < 2 and Rank(Sum({<Product = {[=Rank(Sum(Expense)) < 2]}>}Sales)) < 2"}>} Product, ', ')

QFabian
Specialist III
Specialist III

great!, thanks!

QFabian
diwakarreddy
Contributor III
Contributor III

Hi Sunny,

 

Can you share the logic If i want to display both values with same rank .

 

Thanks,

Diwakar.