Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregation question I think?

Hi,

I am trying to work out how to refer to a all records for a field instead of the components.

As an example I have records similar to this

Customer          Sales

A                         500

A                         423    

B                         150

C                         200

A                         400

B                         100

B                         120

C                         130

D                         500

what I want to do is work out the difference between the average sales for one customer against the fractile of the total data set. As an example

avg(Sales) - fractile(Sales,0.5)

The issues is that I want the fractile of all the sales for the total data set not for that customer. How would I structure this expression?

Thanks in advance

3 Replies
tresesco
MVP
MVP

May be like:

avg(Sales) - fractile(total Sales,0.5)

Not applicable
Author

Try Like this: avg(Sales) - fractile(sum({1}Sales),0.5)

Kushal_Chawda

try this

avg(total <Customer>Sales) - fractile(total Sales,0.5)