We're thrilled to have you join our community of analytics enthusiasts and professionals. To enhance your experience and foster meaningful interactions, we encourage you to personalize your profile by setting up a display name and uploading a profile picture. Your display name will be how others recognize and engage with you in discussions, while a profile picture adds a personal touch to your forum presence.
Take a moment to update your profile with a display name and an image representing you. Let's create a vibrant and engaging community together!
Can Parameter values be used in custom calculations?
We would like to create a custom calculation that filters a measure by the year number in a parameter.
This parameter will enable us to see data in the ending balance of previous years.
We set up our Fiscal Year parameter in the image above.
The calculation validates, however it does not return the proper values. Any advice or input on this topic would be very much appreciated.
Best Answer
-
Hi @CarolineAnderson @Mallikarjuna Kuppauru-Oracle I had a similar calculation built in HCM and it does work. I also validated it against the seeded headcount metric with year as filter. The formulas i had was as below
Current HC - IFNULL(FILTER("HCM - Workforce Core"."Facts - Workforce Headcount"."Headcount" USING "HCM - Workforce Core"."Time"."Year" = @parameter("Period Year")(1111)) , 0)
Previous HC - IFNULL(FILTER("HCM - Workforce Core"."Facts - Workforce Headcount"."Headcount" USING "HCM - Workforce Core"."Time"."Year" = (@parameter("Period Year")(1111)-1)) , 0)
The query for the parameter initial value was as below
Period Year - SELECT "HCM - Workforce Core"."Time"."Year" FROM "HCM - Workforce Core" WHERE (("Time"."Year" IN (YEAR(CURRENT_DATE))))
Raghu
1
Answers
-
As per screenshots your syntax is correct, "however it does not return the proper values" --> means you not able to see the expected value?
Regards,
Arjun
0 -
It does not return the expected value @Mallikarjuna Kuppauru-Oracle . Thanks for getting back to me so quickly!
0 -
Is your logical query is returning correct value?
Pass the filter value directly and then test see are you able to get the expected value instead of passing @parameter
Regards,
Arjun
0