Skip to main content
New Participant
September 4, 2021
Question

Calculate the variance percentage between two fields in a project report?

  • September 4, 2021
  • 5 replies
  • 848 views

I am trying to calculate the variance percentage between two fields in a project report"defaultBaseline:resourcePlannerBudgetedLaborCost" and "resourcePlannerBudgetedLaborCost"

Test code used:

displayname=Budget Percentage Variance

linkedname=defaultBaseline

namekey=view.relatedcolumn

namekeyargkey.0=defaultBaseline

namekeyargkey.1=resourcePlannerBudgetedLaborCost

querysort=defaultBaseline:resourcePlannerBudgetedLaborCost

textmode=true

valueexpression=ROUND(PROD(DIV(SUB({defaultBaseline:resourcePlannerBudgetedLaborCost},{resourcePlannerBudgetedLaborCost}),{defaultBaseline:resourcePlannerBudgetedLaborCost}),100),0)

valueformat=currencyStringCurrencyRounded

The column shows no results. Any help from the community.

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

Kundanism
New Participant
September 8, 2021

Hi @Manoj Peruri‚ @Manoj Peruri‚ @Richard Leek‚

Thanks for sharing this one of the field, could you please share the formula what you are following for this above text mode?

Thanks & regards,

kundan.

Kundanism
New Participant
September 14, 2021

Hi @Manoj Peruri‚ @Richard Leek‚

Thanks for sharing this one of the field, could you please share the formula what you are following for this above text mode?

Thanks & regards,

kundan.

New Participant
September 14, 2021

Hi Kundan,

What do you mean by formula? In my reply to Manoj is the full set of text mode including the value expression?

Best Regards,

Rich.

New Participant
September 5, 2021

Hi Manoj,

There was an error in your syntax within the value expression. Instead of {defaultBaseline:resourcePlannerBudgetedLaborCost}, you need to set it as {defaultBaseline}.{resourcePlannerBudgetedLaborCost}.

The below text mode code should do it:

displayname=Budget Percentage Variance

linkedname=defaultBaseline

namekey=view.relatedcolumn

namekeyargkey.0=defaultBaseline

namekeyargkey.1=resourcePlannerBudgetedLaborCost

querysort=defaultBaseline:resourcePlannerBudgetedLaborCost

textmode=true

valueexpression=CONCAT(ROUND(PROD(DIV(SUB({defaultBaseline}.{resourcePlannerBudgetedLaborCost},{resourcePlannerBudgetedLaborCost}),{defaultBaseline}.{resourcePlannerBudgetedLaborCost}),100),0),'%')

valueformat=HTML

I've also updated the value expression in the code above to concatenate a percentage symbol to the value since you are trying to surface a percentage in your report. Value format has also been changed to HTML instead of currency, since you wont want a currency symbol in your percentage.

Hope this helps!

Best Regards,

Rich.