Thursday, May 31, 2012

Quartiles

Time again for an m*Sight tip. You can find the original, with a document and sample data at Qlikfix.com. Qlikfix is a great place to get some great tips.

Calculated dimensions are a great way to group your information in ways that aren’t present in the data. ‘AGGR’ will aggregate over a chosen field. ‘IF’ statements can be used to rename or group data. The attached example combines ‘IF’ and ‘FRACTILE’.

‘FRACTILE’ allows you to group data into whatever percentiles required. The attached example groups the data by profit into four percentiles. The process is fairly simple:

Create a calculated dimension to establish the Quartiles

     = if(Profit <= fractile(TOTAL Profit, 0.25), 4,
        if (Profit <= fractile(TOTAL Profit, 0.5), 3,
        if(Profit <= fractile(TOTAL Profit, 0.75), 2,1)))

Create your expression

     = Sum (Profit)

Marvel at the coolness of your new chart.



No comments:

Post a Comment