Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to calculate the percentile for each ID, based on the sum(value). Basically, I want to take the max(sum(value) ) as base considering it as 100% and calculate where the remaining IDs belong to. I want to understand which percentile does each ID belongs to when compared to whole data.
From your description I understand a percentage rather than a percentile, are you maybe looking for an expression like this:
Num(Sum(Value)/Max(TOTAL Aggr(Sum(Value),ID)),'0%')
?
Have a look at the Fractile() function.
You may need to wrap it in an aggr() function to get it working on a per-ID basis as well - I'm not sure because I wasn't quite able to understand what you were trying to do based on your post.
From your description I understand a percentage rather than a percentile, are you maybe looking for an expression like this:
Num(Sum(Value)/Max(TOTAL Aggr(Sum(Value),ID)),'0%')
?
Thanku @MarcoWedel and @Or for your inputs. I am trying to use the fractile function already, but was unable to get the required results. I wanted to get a summation of the value column and then use that for getting the percentile using the fractile function, I tried the alternative approach using Marco's Suggestion. It kind of solved the problem.