Home > database >  How to include the result of the calculated column in another calculation with Iforels
How to include the result of the calculated column in another calculation with Iforels

Time:07-10

I build a business automation app with Iforels. They allow using of custom formulas in a "function" field. The question is how to use values from the related Units if the value of the related unit is also the result of the calculation.

For example: I have 5 Units: Earnings, Taxes, Depreciation, Amortization, and EBITDA report. Each Unit has 4 numeric columns (Q1, Q2, Q3, Q4) a date column (year), and a Function column (TOTAL) (Q1 Q2 Q3 Q4).

Works like a charm. However, in the EBITDA report Unit, I have two columns "YEAR" and "EBITDA". The first is the date and the second is the need to make calculations using the result of TOTALS from the previous four units, like: {earnings.total} {taxes.total} {deprecation.total} {amortization.total} WHERE YEAR = {ebitda.year};

Should I import "totals" as separate features to the EBITDA Unit first, or there is a more sophisticated method to get results (maybe Iforels supports something like SQL request?).

Any help will be greatly appreciated!

CodePudding user response:

The easiest solution is: to add columns with totals to your EBITDA Report unit as a relation and then use them in the "EBITDA" column in the same way you've calculated totals.

Iforels doesn't use SQL but you can try to reach the support team about that. The "Function" feature uses something similar to LaTeX "inline-math" and those guys should be able to help you to include references into the formula.

  • Related