9 Replies Latest reply: Feb 14, 2014 5:15 AM by Sara Titmuss

# Expression help!

Hi,

I am trying to write an expression to calculate a pipeline of opportunities.  For example I want to work out the ORDERVALUE if the PROB_DESC is = to 10% then multiply by 10%.

I have tried many different expressions but it doesn't seem to be working for me.

• ###### Re: Expression help!

SUM({<PROB_DESC = {'10%'}>}ORDERVALUE)*10/100

Or

SUM({<PROB_DESC = {0.1}>}ORDERVALUE)*10/100

• ###### Re: Expression help!

Tried, keeps returning a value of 0

• ###### Re: Expression help!

Hi Sara,

What is value in field PROB_DESC look like? or can you upload your app?

Regards,

Sokkorn

• ###### Re: Expression help!

The code behind it is prb.001 etc but I have tried using that and it's still bringing nothing back.....

• ###### Re: Expression help!

Hi Sara,

Are you do this yet

Sum({<PROB_DESC = {'prb.001'}>} ORDERVALUE)*0.1

Regards,

Sokkorn

• ###### Re: Expression help!

Various little things can be wrong. Post an example document to help us in quickly finding the anomaly. Otherwise, the community has to start guessing, and that approach may take a while.

Best,

Peter

• ###### Re: Expression help!

Hi,

Pls post what an example to understand the requirements,

maybe this is what u look for

if(prob_desc=10,order_value*0.1,null()) as new_field

in edit script and sum all
new_field in the chart.

Atleast pls try to create a sample source, so that we can help.

-Sundar

• ###### Re: Expression help!

Hi,

If it is something that you will need to calculate for every register, then it should be done during the load phase in the load script as Sundarakumar is suggesting. This way the application will perform better.

• ###### Re: Expression help!

Perfect, will review the script and try from there!