Hi Experts,
We are currently faced with design dilemma as follow:
Requirement:
Within Profit and Loss Hierarchy (ACCOUNT dimension), the report need to show foreign exchange gain / loss in hierarchy as illustrated below
Net Profit
Total Revenue
Foreign Exchange Gain
Total Expense
Foreign Exchange Loss
Foreign Exchange Gain/Loss are determined by several base level accounts. If the total of those accounts is less than 0, then the total value must be shown in line "Foreign Exchange Gain", but if the total of those accounts is more than 0, then the total value must be shown in line "Foreign Exchange Loss"
Current Approach:
We tackle the requirement by using member formulas:
Foreign Exchange Gain:
IIF([AGM24401000] + [AGM24402000] + [AGM24403000] + [AGM24404000] + [AGM24405000] + [AGM24406000] + [AGM24407000] + [AGM24499000] < 0 , ([AGM24401000] + [AGM24402000] + [AGM24403000] + [AGM24404000] + [AGM24405000] + [AGM24406000] + [AGM24407000] + [AGM24499000]) * -1, 0)
Foreign Exchange Loss:
IIF([AGM24401000] + [AGM24402000] + [AGM24403000] + [AGM24404000] + [AGM24405000] + [AGM24406000] + [AGM24407000] + [AGM24499000] > 0 , [AGM24401000] + [AGM24402000] + [AGM24403000] + [AGM24404000] + [AGM24405000] + [AGM24406000] + [AGM24407000] + [AGM24499000], 0)
Implementing this approach has exposed us with several problems:
- Net Profit not containing correct value since the member formula will not be rolled up (Net Profit is used within some Account Based Calculations)
Solution: Include all subset accounts directly to Net Profit
- In report, the Total Revenue and Total Expense does not roll up Forex Gain/Loss value
Solution: Activate Calculate Parent in Hierarchy
After implementing "Calculate Parent in Hierarchy", we are faced with another issue: Because in column axis we have ENTITY dimension which is also in hierarchy, it calculate the ACCOUNT line item using formula from children ENTITY member. Illustration:
ACCOUNT | CHILD ENTITY 1 | CHILD ENTITY 2 | PARENT ENTITY |
---|---|---|---|
Net Profit | =Total Revenue + Total Expense | =Total Revenue + Total Expense | =Child Entity 1 + Child Entity 2 |
Total Revenue | =Forex Gain | =Forex Gain | =Child Entity 1 + Child Entity 2 |
Forex Gain | 1000 | =Child Entity 1 + Child Entity 2 | |
Total Expense | =Forex Loss | =Forex Loss | =Child Entity 1 + Child Entity 2 |
Forex Loss | 0 | 2000 | =Child Entity 1 + Child Entity 2 |
All is good except that the requirement is for the Parent Entity to show Forex Gain = 0 and Forex Loss = 1000 (2000-1000).
Now we are forced with only 1 option to tackle this requirement with the current setup: Using macro to calculate PARENT ENTITY.
Any other suggestion would be very appreciated as we try to avoid macro for calculation in the hierarchy
Best Regards,
Hendry