# Calculation Functions

**URL:** <https://pug.phocassoftware.com/t/calculation-functions/2009>\
**Category:** Ask the Community\
**Tags:** financial-statements\
**Created:** [October 19, 2021, 5:34pm UTC](https://pug.phocassoftware.com/t/calculation-functions/2009 "2021-10-19T17:34:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JonKemp](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/jonkemp/32/334_2.png) [@JonKemp](https://pug.phocassoftware.com/u/JonKemp)\
**Post date:** [October 20, 2021, 7:16am UTC](https://pug.phocassoftware.com/t/calculation-functions/2009/2 "2021-10-20T07:16:12Z")

</div>

Hi @kai,  
A few options at your disposal.

1. Can it be done as an calculated measure in the DB designer?  
This is mine:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/phocassoftware/original/2X/2/284d01f46e7eb3b9b3243ca8ee8f9a44426f0fca.png)
2. Can you use custom mode to produce the same output?  
Like this:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/phocassoftware/original/2X/5/5f04503a799f967271c196ea1f322a5aacdbd616.png)
3. What if I need to calc on a number that changes?  
This is the use case where static calcs like the above are not acceptable, so you are after if the value is over 50 then do this, else do that. This can be achieved in custom mode by a means of SQL commands. I must stress the case statement approach here will only deal with the numerical result for inspection, i.e. the case will **not** work on the dimension name so case = ‘Fred’ will **NOT** work but Case \> 50 **WILL** work. here is a detailed write up I did a year or so ago: [Percentage share in Custom Mode](https://pug.phocassoftware.com/t/percentage-share-in-custom-mode/1457)  
Hope this helps,  
Jon

---

_[View the full topic](https://pug.phocassoftware.com/t/calculation-functions/2009)._
