I have an alternative calendar hierarchy. One is for Gregorian calendar and another one is for fiscal calendar. The end user can report a metric using Gregorian calendar or fiscal calendar based on a session variable. I have an issue on how to decide hierarchy level based on a session variable. The following is an example. The level can be either Gregorian Week or Fiscal Week depend on a session variable. I tried to use a case statement outside of the AGO function, but it did not work as OBIEE checks formula even though the case is false.
IFNULL( AGO("Core"."Fact - Retail Inventory Receipts"."Receipts Qty", "Core"."Date Retail Fiscal Calendar"."Gregorian Week", 1), 0)
Thanks