Monday, September 30, 2013

Rank Function


1) Select the columns necessary


2) If you are ranking Revenue then select Revenue two times
      3) Click on edit formula on the second measure
 



    4)  Select the rank function from the functions tab
   Functionf(…) -> Aggregate data -> Rank

       5)  Select custom heading to customize your heading (changing name of the column)
Click close once selected

    6)   Click on the measure again in the selected criteria and sort ascending.

Result:


Cast Function




           Cast is to convert data type.

For e.g:
create table a as
Select CAST(hire_date AS CHAR(40))"H_DATE" FROM employees;

select * from a;

DATE_TIME_DISPLAY_FORMAT = "yyyy/mm/dd hh:mi:ss" ;
DATE_DISPLAY_FORMAT = "yyyy/mm/dd" ;
           TIME_DISPLAY_FORMAT = "hh:mi:ss" ;

BottomN Function



BottomN function displays the lowest values from 1 to n, where 1 is the lowest numeric value.

Syntax:

BottomN(expr, integer)

Expr:                      It is an expression of a measure
Integer:                                It can be any positive number

Example:

      1)      Select the necessary columns


    2)   Add another measure or the same measure
Click on the measure -> edit formula
Select BottomN function
F() -Functions - Aggregate - BottomN

Integer can be anything from 1 – N depending on the number of rows in the Column. 


Result: 


The result shows the top lowest bottom revenue