Formula custom field with Advanced Editor

Thank you so much! I really appreciate it!

This topic was automatically closed after 5 days. New replies are no longer allowed.

Hi everyone :wave: I’ve got a quick update to share with you on Formulas!

The past two months saw the introduction of the Formula field in Asana. Starting with the Basic Formula editor which was quickly followed by the inclusion of the Advanced Editor that opened a wide range of new possibilities!

Today, I’m happy to share that rollups are now available to use in Formula fields within Portfolios! :tada:

In case you are not aware already, roll ups were introduced earlier this year - they are essentially special custom fields which you can add to your portfolio. They automatically provide the sum of a number field (which is added to your custom fields library) of all the tasks within a project and displays that sum in your Portfolio.

Up until now, you could add to your portfolio, roll ups of number fields as well as formula fields that are within your projects. But now, you can add to your portfolio, a formula field which can also include roll ups within its equation, either using the Basic editor or the Advanced Editor, as per below!

Gif rollups formula for portfolio

As per the above example, you could take the roll up of all estimated time and subtract that from the roll up of the actual time to get the time remaining of the entire project. Other examples could include finding differences between rollups of budget vs spent as well as other key metrics.

We hope you find this update useful and look forward to reading all your use cases and the roll ups you are planning on using in your Portfolio’s formula fields. Let us know in the comments below!

Please note, this update is being gradually rolled out and it will be available to all Business and Enterprise customers soon.

4 Likes

Hi there,

We started using the custom fields with advanced formula right now and we are thrilled! But we are encountering two issues:

  1. If I use subtasks, then the formula is not applied on the task, even if it has all the needed fields
    For example, below here I have two tasks, containing subtasks that are estimated. We have a custom field that is calculating the estimation in man-days, out of the Estimated field. When we are looking at the subtasks, it works, but when the task is collapsed (like the Development one), even if the Estimated in hours is rolled up, the Estimated in MD is showing a 0 and it’s not performing the calculation

  2. If we are using subtasks (as above) and we are defining a project to a subtask, it creates a mirrored task. All good until here, because I want to move my task around, without affecting the first view. But when we look on the portfolio and to a time rollup, up sums both the subtasks and the mirrored tasks, which from my point of view is wrong. This i initially discovered when rolling up my Estimated in MD, but then I switched to the system field to double check the behavior and it’s the same.

Any advice? Any plans on fixing at least point 1?

Thank you,
Laura

hey, this looks really cool! So I could calculate the time between dates, in that case, correct?

Hi @Joe6 , that’s right! You can achieve this with the Basic editor as well as the advanced editor which allows you to determine tasks in days, hours etc.

Have a look at my post with various use cases using the advanced formula editor:

2 Likes

Hi @Laura_Dragne , welcome to the forum :wave:

Regarding your issues:

  1. Formulas are essentially number fields which, for as long as I know, do not support subtasks roll up to their parent task. This is only currently supported/possible with Asana’s native time tracking Estimated field.

  2. This appears to be a bug. Could you capture it into a bug report, which you can create in the Report a Bug section so it could be better visible and tackled there?

1 Like

I am needing a formula to divide one number field by another and then display the result as a percentage. I’m sure it’s right under my nose, but I haven’t found specific direction on this. How would it be possible with the Advanced Editor? @Richard_Sather Thanks!

Hi @Kevmoore , welcome to the forum :wave:

Yes this is certainly possible with the Advanced editor!

So you have two number fields, let’s call them X and Y. If we assume that Y would be regarded as 100% while X is less in value than Y, then your formula would be X/Y*100. The result will be what percentage is X in relation to Y. And you would type it into the advanced editor exactly like that:

image

Note that the result will be displayed as a number with 2 decimal places without a % sign appended to it (even if X & Y are not formatted with decimal places). This is because unfortunately, currently, Formulas in Asana cannot be formatted, like normal number fields.

1 Like

Thanks Richard! The percentage formatting for formulas is what I was most curious about. That’s what I need, as I am dividing two whole numbers and need the result to show as a percentage (particularly for reporting on the Dashboard view of the project). For now, I’ll have to continue with my napkin math to arrive at the result. Are format options for formulas on the roadmap?

Thanks again!

@Kevmoore , understood. Asana does not make their roadmap public but I’m fairly sure they are working on more updates to formulas and hopefully a ‘Percent’ function would be ideally added so that the results are displayed with the % symbol. The only way to get the result of a formula as a percentage (with a % symbol) is if ALL the number fields, used in the formula, are formatted as percentages.

However, I don’t see why you cannot use the formula as is for now, as long as the Formula field is titled ‘Percent (%)’, that would be clear enough, right? And in your Dashboard’s charts, make sure to title the chart accordingly. That’s surely better than manually calculating and inserting the result yourself into a percentage number field, no?

It definitely eliminates the manual work. I’ll give it a shot. Thanks for all the help, Richard!

1 Like

hi! I have the enterprise license but for me it only shows selected date columns when I select field 1 and field 2 and not the columns I want to create the calculated field. Both columns are numeric so ideally I should be able to see them. any ideas?

sorry I cannot post a screen cap!

Hi @Riddhiman_Sherlekar , welcome to the forum :wave:

Hmm, that’s strange. Are you sure your fields are added to the project where you are trying to create your formula field, and they are not just in your field library?

Even if you try to add the formula field to your library, you should still see a pop-up asking you to add any fields that are not already in your library, like this:

Is this what you are seeing? Or you are NOT seeing your fields at all in the list?

If so, try going to your project’s ‘Customize’ menu (top right button) and check under ‘Fields’, and note the icons next to your fields.

Do you see a ‘#’ or an ‘A’ next to them? If you see an ‘A’ that means you have created text fields instead of number fields, so you will need to recreate your fields as number fields.

Hi all! Richard here, an Asana Solutions Partner (consultant and trainer) and also part of the amazing Asana Forum team. :wave:

I’m happy to announce that Formula Chaining will be rolling out to all Business and Enterprise tiers today!

What is Formula Chaining?

With this update, you will be able to use Formula custom fields as inputs to build another Formula custom field using the Basic and Advanced Editor.

Let’s assume you have the following:
Formula 1 = Custom field A + Custom Field B
Formula 2 = Custom field A * Custom Field C

So with the Basic formula editor you will be able to create a new ‘Formula 3’ which is made up of Formula 1 + Formula 2 (or you can also use subtract, multiply or divide).

Using the Advanced Editor you could also include custom fields and number into the mix, such as ‘Formula 3’ divided by ‘Custom Field D’ and eg. multiplied by a number value.

A real-life example:

  1. Formula A ‘Subtotal’ = Cost per item * Quantity
  2. Formula B ‘20% TAX’ = Formula A ‘Subtotal’ * 0.20
  3. Formula C ‘Total’ = Formula A ‘Subtotal’ + Formula B ‘20% TAX’

:bulb: Notes

For the following, ‘Local’ refers to a custom field which is added only to one project, whereas ‘Global’ refers to custom fields which are added to the custom field library.

  1. Global formulas can only use global custom fields as inputs.
  2. If you add a global formula to a project, Asana will require all input custom fields to also be added to the project (if they haven’t already been added, you will be prompted to add them).
  3. When you create a local Formula custom field in a project:
    a) Local and global formula custom fields can be used as inputs
    b) If using a global formula custom field, its input fields should also be added to the project
  4. When you create a global Formula custom field in a project:
    a) Only global Formula custom fields can be used.
    b) If using a global formula custom field, its input fields should also be added to the project

:arrow_up: Limitations

  1. You can use up to 10 existing formulas within a Formula custom field (using the advanced editor).
  2. The number of Formula custom fields within a project is subject to the current limit of 100 custom fields (of any type) within a project.
  3. You will be able to use up to two layers of chains. You will not be able to create a formula custom field with another formula custom field as an input, if that formula is also made up of one or more formulas. For example:
    a) Possible:
    Formula 1 = Custom field A + Custom field B
    Formula 2 = Formula 1 / Custom field C (1st layer)
    Formula 3 = Formula 1 - Formula 2 (2nd layer)
    b) Not possible to use Formula 3 as an input in another formula, such as:
    Formula 4 = Formula 1 * Formula 2 * Formula 3 (3rd layer)
    c) To overcome this limitation, you could simply create Formula 4 by rebuilding Formula 3 into it, as per below:
    Formula 4 = Formula 1 * Formula 2 * (Formula 1 - Formula 2)

:question: Q&A

Will Formula Chaining be available for formula custom fields in Portfolios?
Yes!

When will this roll out?
Gradually over the coming days. Tip: refresh your browser from time to time, or close and reopen to the Asana desktop of if you use that instead.

Which Asana tiers will this be available to?
Business and Enterprise, of which, Formula fields are already available to.

How many formula fields can I include within a formula field?
10. Didn’t you read the limitations section above? :sweat_smile:

How many formulas can I chain?
Two layers. Come on, now I’m just repeating myself. :stuck_out_tongue_winking_eye:

Looking forward to hearing what you think of this update and how you will be using it.
Happy chaining!

7 Likes

Finally :smiley: !!!

Is there a way to tie a formula to a task and a changed state? For instance, a rule that when task A is marked complete, then run custom formula X and Z. Thanks!

Hi @John_Bates , I’m not quite sure if I’m following what you mean.

Formula fields are dynamically updated whenever their input fields are changed. So if a task is complete or it’s dropdown field is changed, you could have a rule to update any of the formula’s input fields (such as a task’s due date, estimated time or a number type field) so that the formula field would be updated accordingly.

Perhaps if you could explain this as a real world scenario, I could provide a better answer.

Sorry, the error is "Add() expects two input fields’ but i don’t understand this error as I thought you could add up to 10 fields to add together (number fields)