Our HFM app is default YTD. We calculate tax amount on periodic earning balance. The issue is when the month periodic earnings is missing (no value loaded), the periodic tax amount is NOT zero, instead it is a derived value using current YTD (0) minus prior YTD data (prior period earnings has data).
I am trying to use below rule to populate zero in above scenario but seem not working. Can you please point out the issue causing not working? Any better options to address the issue? Thanks!
If povValue = "\<Entity Currency>" Then
Set BaseDataUnit = Nothing 'Clear BaseDataUnit Object's Memory
'Open Data Unit of current entity and value dimension; get periodic values for C3 = \[None\]
Set BaseDataUnit = HS.OpenDataUnit("S#" & povScenario & ".Y#" & povYear & ".P#" & povPeriodName & ".E#" & povEntity & ".w#Periodic.C3#\[None\].A#12345")
vNumItems = BaseDataUnit.GetNumItems 'Set variable to total number of items in Data Unit
For j = 0 to vNumItems - 1 'For each item in list
'Get Item
Call BaseDataUnit.GetItem(j,strAccount, strICP, strCustom1, strCustom2, strCustom3, strCustom4, dData)
'Check if the data is Real or Derived
dRealData = HS.GetCellRealData("S#" & povScenario & ".Y#" & povYear & ".P#" & povPeriodName & ".E#" & povEntity & ".A#12345.I#" & strICP & ".C1#" & strCustom1 & ".C2#" & strCustom2 & ".C3#" & strCustom3 & ".C4#" & strCustom4, bIsRealData)
'If it is Derived and not zero
If bIsRealData = False And dData \<> 0 Then
'Write a zero to the intersection
HS.Exp "W#Periodic.A#12345.I#" & strICP & ".C1#" & strCustom1 & ".C2#" & strCustom2 & ".C3#" & strCustom3 & ".C4#" & strCustom4 & " = 0"
End If 'bIsRealData = False And dData \<> 0
Next
End If ' povValue = "\<Entity Currency>