Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys
I am looking to Rank Rejection reasons as per the frequency they occur.
I have the Rejection reasons loading from an excel spreadsheet , where the rejection reasons are all listed in one cell - so I have split out each reason on load using the below.
if(trim(upper(subfield([Rejection Reasons], ',')))='',null(),trim(upper(subfield([Rejection Reasons], ',')))) as ReasonSub
I now would like to rank it in the script ,as I do not want the rankings to change when certain filters are selected in the chart .
Can anyone advise if this can be done and if so any pointers greatly appreciated
Thanks
A
Using the script as I pasted it in , this is the chart
ReasonSubs | Number of Rejections | Rank | Correct Rank |
Incorrect Docket | 363 | 2 | 1 |
Fire Damage | 150 | 5 | 2 |
Under use | 142 | 4 | 3 |
Bad Rate | 123 | 3 | 4 |
Trade Green | 118 | 7 | 5 |
Knife Sharp | 112 | 6 | 6 |
So Rank is the result and Correct Rank is the desired result
To be honest Im not too concerned about ranking at customer level , I just want to see the most popular rejection reasons
In the chart I used expression
rank(sum({$<[Approved? N/Y] = {"*No*"}>}Numbers),ReasonSubs,1)
And this worked fine - but I really would like to show the ranking whilst not effected by filters
Thanks
Rank function is available for use in chart expressions only.It is not available in load scripts. In load script, you may use Order By.
I am slow from time to time, but I am not seeing how just repeating your message helps me here.
In your expression
rank(sum({$<[Approved? N/Y] = {"*No*"}>}Numbers),ReasonSubs,1)
how do you derive Numbers? Can't see it in your script.
What does the ReasonSubsCount show when compared to your Number of Rejections?
If I understand your request correctly, I still think that calculating the rank in the script should be possible using a count (or whatever appropriate) in a group by load and the assign a rank number in a order by load.
If it's all about creating a rank expression in the front end that is not sensitive to selections, you can try using set analysis (set identifier 1).
See attached.
OMG Swuehl
Sorry I didnt mean to repost ( that must look rude - sorry !!!) Sometimes my I get errors when posting a message onto the forum and then it posts twice ,
Let me have a look at making a dash that explains my issue
Thanks
A
Hi guys
Thanks for your time on this -- the issue is with my data model
I have rewrite most of the script to accomodate what I require now
Thanks for your posts they will deffo assist when I go to redesign the dash
A
Hi guys
Thanks for your time on this -- the issue is with my data model
I have rewrite most of the script to accomodate what I require now
Thanks for your posts they will deffo assist when I go to redesign the dash
A