Skip to main content
Level 2
Sep 4, 2021 7:32 AM UTC
Question

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

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

Richard_Le_
Community Advisor
Community Advisor
Sep 5, 2021 8:46 PM UTC

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.

Translate
Kundanism
Level 10
Sep 8, 2021 12:30 PM UTC

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.

Translate
Kundanism
Level 10
Sep 14, 2021 7:56 AM UTC

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.

Translate
Richard_Le_
Community Advisor
Community Advisor
Sep 14, 2021 8:11 AM UTC

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.

Translate