How to calculate numbers stored in List Data macro

Scenario

Currently, Eval Data macro can't be stored within List Data macro. However, to achieve this use case, there is a workaround by using the Reporting for Confluence app. Specifically, Report Eval macro which allows the computation of List data macro and much more.

See this in action here.



Recipe

Ingredients

Apps

Scaffolding, Reporting
Platform
Server, Data Center
Level

ADVANCED

Estimated time

15 minutes

Macros

Suppliers

Storage format

Steps

  1. Create a Table Data macro and set the Name of the table
  2. Inside the Table Data macro create a table with 5 columns and 2 rows, like the one in the image:

  3. Inside the first column insert a List Data macro and set the Name to "Impact" and blank to "false"
  4. Inside the List Data macro, add a List Option macro and set Value to 10 and Label to 10%
  5. Inside the List Option macro create a Set Data macro and set Name to "setimpact" and Hidden to "true" and Type to number
  6. Inside the Set Data macro type 10
  7. Inside the List Data macro, add another List Option macro and set Value to 40 and Label to 40%
  8. Inside the List Option macro create a Set Data macro and set Name to "setimpact" and Hidden to "true" and Type to number
  9. Inside the Set Data macro type 40

  10. Inside Effort to Implement column insert a List Data macro and set Name to "Effort" and blank to "false"
  11. Inside the List Data macro, add a List Option macro and set Value to 1 and Label to ≥45 weeks (>3 quarters)
  12. Inside the List Option macro create a Set Data macro and set Name to "seteffort" and Hidden to "true" and Type to number  
  13. Inside the Set Data macro type 1
  14. Inside the List Data macro, add a List Option macro and set value to 2 and Label to 33 - 40 weeks (~3 quarters)
  15. Inside the List Option macro create a Set Data macro and set Name to "seteffort" and Hidden to "true" and Type to number  
  16. Inside the Set Data macro type 2

  17. In the IE Score column, create a Report Eval macro and set the following:
    Name: "IVEScore"

    Default Value 0
    Format #,##0.0
  18. Inside the Report Eval macro type the following formula: 

    %data:setImpact%*%data:setEffort%