i have a table t with
product, sales and expense column, e.g
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
Solved! Go to Solution.
Product, which is having highest expense in a text object
Product, which is having max sales in a text object
Are you looking to find the product which has the biggest expense and if that ties with another product, you want to then find the one with the highest sales among the one with the biggest expense?
I summed up all sales in load script and then I created a Grid Chart. The top right product is the one you are looking for. I also added number of sales - size of the bubble depends on it.
There is also a straight table with checked max number of records setted to 1 (Presentation tab of the chart).
i can not do this in script, because i have other columns also, i have just given a brief here,
can i do that in UI only?
hi sunny thanks a lot, it's working fine
bt in some cases when if i make selections on year, some then in some years there are products, who have same rank in firstSortedvalue function, in that case it's returning null... is there a way to resolve this issue
If there are two with the same rank based on Expense and Sales, which one of the two would you want to see? Any one or both? For Anyone... try this
FirstSortedValue(DISTINCT Product, -Aggr(Sum(Expense) + Sum(Sales)/1E10, Product))