Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
My requirement is to find CITYwise,Top VENDORSHORTNAME according to sum(trade_value) and then count of LOCATIONID
i have create a Variable with following expression : vTopVendorCitywise: FirstSortedValue(VENDORSHORTNAME,-aggr(Sum(TRADE_VALUE),VENDORSHORTNAME,CITY))
below is the expression in using in Straight table with Dimension CIty 
=Count( DISTINCT {<VENDORSHORTNAME={'$(=vTopVendorCitywise)'}>} LOCATIONID)
Please let me know what wrong i am doing in this
Use Rank function and Max may give you the solutions.
Ex: Max(sum(Tradevalue),Vendorcity) like this.