Data Flow Target Formula vs. Procedure Debugger Layout

Unknown
Unknown Active Partner
edited February 2021 in Platform
Hello,

Thank you for taking the time to review this query! 

I am trying to understand why the algorithm in our target cube does not calculate properly when running the procedure. However, if we insert the same formula in an  algorithm block in a Procedure Debugger Layout the algorithm block calculates accurately.

Any help is much appreciated!

Context:
In the image below I am creating a data flow to a target cube called "Opex Override Target Amt"(Block G)
  • This cube will show Opex budget for an individual Cost Center by:
    •  taking the ratio of previous year Opex actuals of each Cost Center(Block B) by the previous year total of Opex actuals of the Entire Department(Block C) and multiplying this by a Target Amount(Block F)
  •  Also, the end user will choose a "Driver" in Block A to calculate this formula by either Prior Year% Expense or Prior Prior Year% Expense
    • Thus, the target cube formula reads: if Block A = "Prior Year% Expense", then (Block B / Block C) * Block F, else (Block D / Block E) * Block F
    • *Note: Block C and Block E are Totaled by Department and by Year
    image



    This data flow does not execute properly.
    The image below taken from the Procedure Debugger layout illustrates the discrepancy:
    • Block G is the target cube and did not calculate properly
    • Block H was inserted as an algorithm block and copied the same formula as the target cube
      • This block IS calculating properly
    • I have also inserted a screenshot of the Cube Structures for your reference
    Is there a reason why the algorithm block calculates properly, but the Data Flow algorithm does not?

    image
    Cube Structures:


    image



    Thank you again!


    ------------------------------
    Todd Choi
    Consultant
    Impetus Consulting Group, LLC
    United States
    ------------------------------

    Answers

    • Leone Scaburri
      Leone Scaburri Employee
      Fourth Anniversary 100 Comments 5 Answers 25 Likes
      edited February 2021
      Dear @Todd Choi,

      dataflow and layout algorithm can provide different outcome:
      - dataflow is executed at most granular level and then aggregated at "layout level"
      - algorithm is calculated at "layout level" which in your case is aggregated

      e.g.
      Dataflow: (10:5)+(10:5)=2+2=4
      Algorithm:(10+10):(5+5)=20:10=2 

      Regards,
      Leone

      ------------------------------
      Leone Scaburri
      Consultant
      Board Community
      Switzerland
      ------------------------------
      -------------------------------------------