Oracle Fusion Data Intelligence

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

Count the number of HIRES in a specific way

Accepted answer
11
Views
1
Comments

Hi, I need to create a line chart showing the number of hires for each company year by year.

One of these companies, let's say company "A", should also add the hires of another company, let's say company "B", when year < 2023 because it was merged with the first one.

Is there a way to create a key metric or a calculation to do so?

Tagged:

Best Answer

  • Sumanth V -Oracle
    Sumanth V -Oracle Rank 8 - Analytics Strategist

    @Stefano_Mazzocca - Create a custom calculation in OAC DV as below:

    CASE
    WHEN "Year" < 2023 AND "Company" IN ('A', 'B') THEN "Hires"
    WHEN "Year" >= 2023 AND "Company" = 'A' THEN "Hires"
    ELSE 0
    END

    This logic ensures:

    • Before 2023: Hires for both company "A" and "B" are aggregated.
    • From 2023 onwards: Only hires for company "A" are included.
    • Use this custom metric in your line chart.
    • Set the X-axis as "Year".
    • Set the Y-axis as the custom metric created above.
    • Hope this helps!. Thank you!.