If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

QUARTILE Function - How to use

Started by Filomena.Mignelli, 22 Feb 2024 10:48:55 AM

Previous topic - Next topic

Filomena.Mignelli

This may be a dum dum question, but I can't find any documentation on how to use the Quartile Function.  Using MS Excel is easy using the Array and Quart for the single value.  I just don't know how to reproduce it using Queries in Cognos.  Any help is appreciated....thank you!

bus_pass_man

Where have you looked?

This is the documentation in the 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).

Filomena.Mignelli

#2
I understand what it returns...meaning integers from 1 (highest) to 4 (lowest), relative to a group of values.  I just do not know how to render it like in MS Excel.

Example...I have:

[Code Name]       [Time (Hrs)]  [Quartile Time]-> quartile ( [Time (Hrs)] for [Code Name] )
A1-24-Day    0.33333333    4
A1-24-Day    0.41666667    3
A1-24-Day    1.5           2
A1-24-Day    0.41638889    4
A1-24-Day    0.66611111    3
A1-24-Day    0.49972222    2
A1-24-Day    1.2           1
A1-24-Day    0.76611111    3
A1-24-Day    0.51666667    2
A1-24-Day    4.28333333    1
A1-24-Day    0.33          4
A1-24-Day    0.25          3
A1-24-Day    1.83305556    2
A1-24-Day    1.33305556    1
A1-24-Day    0.79972222    3
A1-24-Day    1.5           2
A1-24-Day    6.45          1

In MS EXCEL, if I use =QUARTILE.INC (B2:B18,1) for Quartile 1, I get a value of 0.416667.  How do I achieve the same 0.416667 value using Cognos?