Hello,
I need your help to figure out how i can get quartile of a list of values.
For exemple, I have the values :
100,200,300,300,400,500
I can i get the first quartile and the third quartile with report studio ?
For me, first quartile : 200 or 250 ( I do not very well)
third quartile (400 or 450)
Thank you for your help.
You could use the quartile() function. I copied the following from the Tips tab in the Report Studio expression editor.
quartile ( numeric_expression [ at expression { , expression } ] [ <for-option> ] [ prefilter ] )
quartile ( numeric_expression [ <for-option> ] [ prefilter ] )
<for-option> ::= for expression { , expression }|for report|auto
Returns the rank of a value, represented as integers from 1 (highest) to 4 (lowest), relative to a group of values. The "<for-option>" defines the scope of the function. The "at" option defines the level of aggregation and can be used only in the context of relational datasources.
Example: quartile ( Qty )
Result: Returns the quantity and the quartile of the quantity value represented as integers from 1 (highest) to 4 (lowest).
Qty Quartile (Qty)
450 1
400 1
350 2
300 2
250 3
200 3
150 4
100 4
Thank you for your answer.
But this function do not return the value of the first quartile, it is just show the group of each value.
Because, for me i want to have :
first quartile = one value
third quartile = one value.
Is it even possible with cognos 8.3 ?
Thank you
Add the quartile as a data item, then in your report use the normal aggregation expressions to get the min, max, average, median, or whatever it is you want for each quartile 'group'.