Oracle Fusion AI Data Platform Forum

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

Worker count goal numbers using My Calculation in FAW

Received Response
18
Views
2
Comments

Hello,

I am trying to enter in goal numbers base on worker count for a legal entity by month. I'm trying to create a calculation and this is what I have so far.

CASE
WHEN "HCM - Workforce Core"."Legal Employer"."Legal Employer Name" = 'Legal Employer' THEN
CASE
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/01' THEN CAST('184' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/02' THEN CAST('188' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/03' THEN CAST('192' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/04' THEN CAST('199' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/05' THEN CAST('203' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/06' THEN CAST('203' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/07' THEN CAST('209' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/08' THEN CAST('216' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/09' THEN CAST('223' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/10' THEN CAST('224' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/11' THEN CAST('227' AS DOUBLE)
WHEN "HCM - Workforce Core"."Time"."Month" = '2026/12' THEN CAST('231' AS DOUBLE)
END
END

Depending on how it's set up, the calculation either comes out as a character attribute or a time attribute. I'm trying to create a number calculation so I can add it to a graph.

Answers

  • Brendan T
    Brendan T Rank 6 - Analytics & AI Lead

    The problem mights be with the quotes around the number. Try something like this

    CASE
    WHEN "HCM - Workforce Core"."Legal Employer"."Legal Employer Name" = 'Legal Employer' THEN
    CASE
    WHEN "HCM - Workforce Core"."Time"."Month" = '2026/01' THEN 184.0
    WHEN "HCM - Workforce Core"."Time"."Month" = '2026/02' THEN 188.0
    WHEN "HCM - Workforce Core"."Time"."Month" = '2026/03' THEN 192.0
    ...
    ELSE 0.0
    END
    ELSE 0.0
    END

    and add the else to ensure consistent return per row

    Also look at the workbook editor and change from 'Attribute' to 'Measure' and data type of Number or Double

  • @SJ77225 , Welcome to the Oracle Analytics Community!

    As suggested above @Brendan T , please give it a try.

    Alternatively, see if following approach will be better for long term solution and avoid CASE statements…

    • Create a small Goals table (Legal Employer, Month, Goal)
    • Load via data augmentation
    • Join to Time + Legal Employer