# Expression - Label value - Calculation of Percentage

**URL:** <https://forum.radzen.com/t/expression-label-value-calculation-of-percentage/6033>\
**Category:** Angular\
**Created:** [December 16, 2020, 11:07am UTC](https://forum.radzen.com/t/expression-label-value-calculation-of-percentage/6033 "2020-12-16T11:07:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![koblamic](https://forum.radzen.com/letter_avatar_proxy/v4/letter/k/c2a13f/32.png) [@koblamic](https://forum.radzen.com/u/koblamic)\
**Post date:** [December 16, 2020, 11:07am UTC](https://forum.radzen.com/t/expression-label-value-calculation-of-percentage/6033/1 "2020-12-16T11:07:08Z")

</div>

Hello,  
I need to calculate percentage expression in for angular label value.  
It should be like this: ${ (A + B) / (A + B + C + D) }  
Unfortunatelly, when I try to enter such a expression, it fails in compile.

Is there any elegant work-around or fix?

My expression:  
${(ProductionOrder.Pieces\_GoodCount + ProductionOrder.Pieces\_ScrapProcessCount) / (ProductionOrder.Pieces\_ScrapStartupCount + ProductionOrder.Pieces\_Test + ProductionOrder.Pieces\_TestPT + ProductionOrder.Pieces\_TestCohesion + ProductionOrder.Pieces\_ResidualCount)}

Error:  
"Failed to compile"  
: Parser Error: Missing expected ) at the end of the expression [(ProductionOrder?.Pieces\_GoodCount + ProductionOrder?.Pieces\_ScrapProcessCount) / ((((ProductionOrder?.Pieces\_ScrapStartupCount + ProductionOrder?.Pieces\_Test) + ProductionOrder?.Pieces\_TestPT) + ProductionOrder?.Pieces\_TestCohesion) + ProductionOrder && (ProductionOrder.Pieces\_GoodCount + ProductionOrder.Pieces\_ScrapProcessCount) / ((((ProductionOrder.Pieces\_ScrapStartupCount + ProductionOrder.Pieces\_Test) + ProductionOrder.Pieces\_TestPT) + ProductionOrder.Pieces\_TestCohesion) + ProductionOrder.Pieces\_ResidualCount)]

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [December 16, 2020, 12:19pm UTC](https://forum.radzen.com/t/expression-label-value-calculation-of-percentage/6033/2 "2020-12-16T12:19:26Z")

</div>

Hi @koblamic,

You can create a page property which contains the value and use that property for the label Text.

---

<div class="post-metadata">

**Author:** ![koblamic](https://forum.radzen.com/letter_avatar_proxy/v4/letter/k/c2a13f/32.png) [@koblamic](https://forum.radzen.com/u/koblamic)\
**Post date:** [December 16, 2020, 1:40pm UTC](https://forum.radzen.com/t/expression-label-value-calculation-of-percentage/6033/3 "2020-12-16T13:40:02Z")

</div>

Thank you for proposal. That works properly.
