I have a problem with concat function. I'm try get string with top 4 countrys by sels in string with comma delimitr.
But i need sort it to use SubField after in setAnalysis... so, if i dont use sort inside concat it work fine, but if i user sort expression function (concat) gives my not sort string + the same string sort...
What i do wrong?
The branch is still relevant!
I got out of the situation simply using the formula n + k, where n - varies from 1 to n of my measurement options, and 'x' is the maximum number.
@lord_zeus If that resolved, please mark yourself as correct answer with solution. If not resolved yet, Kindly share some sample data set and outcome
im finde some kinde of solution but, im dont understand why it work like that:
so if we have table with 'countrys' and we wont make a list with 3-4 top by sales in country we will have result like me. But, if we have a referance book ( directory) with unicu list of countrys ( in fact table we will have 1000 records, but in country table we have 10 unical rows with keys to fact), and make concat by this tables of countrys and make rank by sales in fact - everithing will by fine, and im have no doubles in result list after concat with sort.
Why it happends im dont know...
I think @hic @rwunderlich can give you better insight. What I am thinking this is happening because of set analysis. If I use rank function with simple if statement it works. Here I don't need to use any qualifier like distinct or nodistinct
=Concat(aggr(if(Rank(Sum( Sale))<3,Country),Country),',', -aggr(sum(Sale),Country))