Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
im trying to create a std deviation calculation to show how far away from the price a certain customer is.
so i have this logic:
=min({<Customer>} total <Customer> Aggr({<Customer>}If(PricePaid = FirstSortedValue({<Customer>} TOTAL <Customer> PricePaid, -Aggr(Sum({<Customer>}[Quantity]), Customer, PricePaid)), only({<Customer>}PricePaid)), Customer, PricePaid))
which finds by each customer the most frequent price each customer has paid for a particular product, as shown below an example:
what i want to do is then create ST deviation for these results that are created in using the logic above.
is this something that i can incorporate into a Stdev expression?
Maybe the following would work:
Best I have, hopefully that may be of some help, if not, hopefully someone else that is better at development will be able to suggest something. You could try the Design Blog area too, but I did some searching, was not finding much related to stats though...
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Regards,
Brett
You just need to wrap your function in another aggregation and then calculate the standard deviation; please note you had some unnecessary set expressions in your formula which I've removed
=Stdev(aggr(min(total <Customer> Aggr(If(PricePaid = FirstSortedValue( TOTAL <Customer> PricePaid, -Aggr(Sum([Quantity]), Customer, PricePaid)), only(PricePaid)), Customer, PricePaid)), Customer))