Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

OBIEE Analysis - Calculate Years of Service Formula

Received Response
63
Views
8
Comments
JHaden3
JHaden3 Rank 3 - Community Apprentice

New to OBIEE.  I have an analysis that I need to add a column that shows the employee's actual years of service (as of current date), for example, 4.3 years or 2.7 years.  The field I'm using is

"Workforce Management - Worker Assignment Real Time"."Worker"."Enterprise Hire Date".  I would like to use a formula on the field to do this.  Appreciate any help you can provide please.

Answers

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    TIMESTAMPDIFF(SQL_TSI_MONTH, "Workforce Management - Worker Assignment Real Time"."Worker"."Enterprise Hire Date", NOW()) / 12.00

  • JHaden3
    JHaden3 Rank 3 - Community Apprentice

    Thank you for your quick response.  Would you mind updating the formula to show only two decimal places.

  • What about you look at all the formulas in the formula editor and check out "ROUND" ? It has a little example and few lines explaining how it works.

    The target isn't us giving you fully working code but you learning the tool. I'm sure you can do that part (ROUND is almost the same in 80% of the languages and tools)

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    Beaten by Gianni, but my 10 cents:

    I love helping people, but have you clicked on ANY of the buttons? Like the "Format Column? There is a tab called "Data Format". You can either ROUND in The formula or format it to show 2 decimals.

    And already having 2 options: *think* about which one would be appropriate for you.

  • JHaden3
    JHaden3 Rank 3 - Community Apprentice

    Thanks everyone for your responses.  I apologize for the inconvenience.  I'm very new to Oracle reporting, and find myself getting caught up in the job pressures of others needing data urgently.  I lean on this forum for the quick expertise while I continue to learn.  Thanks again everyone.

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    No need to apologize. Just click and try first. The GUI contains tons of possibilities which are pretty well explained - case in point: The formula editor with some 200 functions that you can just put together with point and click; no need to code yourself.

    You can't really break things in the front-end. Try out things. Test. Once you have something you can always run it by us to see if it's the most optimal way of doing things or if there's a different approach or maybe even an out-of-the-box solution for somehtng you've tediously scripted together.

    Luckily your case was straightforward but any questions in here tend to be very vague and almost impossible to answer without more information as we aren't sitting in front of the system where the issue comes from.

    If you want to learn, then there's also the Oracle Learning Library: https://apexapps.oracle.com/pls/apex/f?p=44785:1

    It has tons of examples, tutorials for just about anything. Just search and click on what you want.

    If you also use Data Visualization, then there's tutorials there too: https://www.oracle.com/business-analytics/data-visualization/tutorials.html

    Same for Cloud: https://www.oracle.com/technetwork/middleware/oac/tutorials/index.html

    Oracle even put a free course on Udemy: https://www.udemy.com/course/augmented-analytics/

    Long story short there's a lot of places that Oracle provides where you can learn for free

  • JHaden3
    JHaden3 Rank 3 - Community Apprentice

    Great information, thank you!

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    That's what we're here for