Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Aggregation question I think?


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

Re: Aggregation question I think?

May be like:

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

Not applicable

Re: Aggregation question I think?

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

Re: Aggregation question I think?

try this

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