Friday 22 November 2013

06 calculations

                                                        06 calculations
           In OBIEE we can do calculations in 3 ways.
              1. Creating calculation based on logical columns.
              2. Creating calculation based on physical columns.
              3. Creating calculations based on by using calculation wizard.

         0.6.1 Creating calculation based on logical columns
               1. Open RPD in online mode.
               2. Right click on BMM layer sales fact table ->New object -> logical column.
               3. Name it as cuts.
               4. Click on column source tab.
               5. Select radio button Derived from existing columns using an expression.
               6. Click on edit expression
                           Select category -> logical tables.
                           Logical table -> sales
                           Columns -> double click on unitord column ->type Minus(-) ->
                            double click on unitship columns.
               7. Click on ok ->again ok


 







             8. Drag and drop into presentation layer sales presentation table.

          0.6.2 Creating calculation based on physical columns
                      1. Expand sales logical table
                      2. Double click on D1_orders2 LTS.
                      3. Click on add new column.
                      4. Name it as cutsp.
                      5. Click on ok.
                      6. Click on edit expression.
                      7. Double click on unitord -> type minus (-) -> double click on unitship.
                      8. Click on ok-> again ok.














              9. Double click on cutsp ->aggregation tab ->sum
              10. Click on ok .
              11. Drag and drop onto presentation layer sales table.

          0.6.3 calculation by using calculation wizard
              1. Right click on unitord -> click on calculation wizard ->next.
              2. Select unitship ->next.
              3. Disable percentage change.
              4. Rename it as Cutsw.


















              5. Click on next -> click on Finish.
              6. Drag and drop into presentation layer sales table.
              7. Check in changes.
              8. Reload server metadata.

           Testing :
                            Develop a report with year, month code, unitord, unitship, cuts,
                             cutsp ,cutsw & observethe output.
          Notes:
                     1. In logical calculations pre aggregation will take place
                     2. In Physical calculations post aggregation will take place
                     3. As a best practice use logical columns in calculations
                     4. Calculation Wizard is useful to handle NULL values and 
                          DIVIDE WITH ZEROerror
                     5. Calculation wizard is useful to calculate percentages easily.

No comments:

Post a Comment