Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
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
No, it still not resolved. In still have this problem. Example in att
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...
Im wont to finde solution without need to add new table in model.... it is possible?
may be this
Concat({<Country = {"=Rank( Sum( Sale))<3"}>} distinct Country,', ', -aggr(nodistinct Sum(Sale),Country))
@Kushal_Chawda yes, its work! Any explane of this? why did you decide to use nodistinct?
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))