Forum Discussion

Montreux's avatar
Montreux
New Contributor III
3 years ago
Solved

How to calculate when accounts have different settings for No Data Zero View for NonAdjustments

I want to run a simple calculation setting one account equal to another.  Account A = Account B.  Account A, the account receiving the data in the calculation, is set to at the member level to YTD fo...
  • JackLacava's avatar
    3 years ago

    That behavior depends on Account Type - Flows will work differently from Assets/Liabilities. Determine which account types you have for A and B, and then when copying data specify the View member you're actually interested in copying.

  • ChrisLoran's avatar
    3 years ago

    Not ideal, but so long as it is just an exceptional case for a few accounts, then you could always do a calculate that adds the value of T#PovPrior1 (if it's not the first period) on the target account, effectively doing a periodic calculation:
    e.g.
    if api.Time.IsFirstPeriodInYear() then
      api.Data.Calculate("A#AccountA = A#AccountB" , True)
    else
      api.Data.Calculate("A#AccountA = A#AccountA:T#PovPrior1 + A#AccountB:V#Periodic" , True)
    end if

    obviously not particularly efficient since it has to open the previous period's data unit into memory (but that's how periodic views work anyway).   A more flexible option would be to open databuffers and test properties such as 
    If api.Account.GetNoDataZeroViewForNonAdj( accountId ) = ViewMember.Periodic Then ...

    and as JackLacava said, be careful about the switching behaviour on the Flow members.