Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

9 Replies
MK_QSL
MVP
MVP

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

Or

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

Not applicable
Author

Tried, keeps returning a value of 0

Sokkorn
Master
Master

Hi Sara,

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

Regards,

Sokkorn

Not applicable
Author

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

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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

Sokkorn
Master
Master

Hi Sara,

Are you do this yet

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


Regards,

Sokkorn

sundarakumar
Specialist II
Specialist II

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

Not applicable
Author

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.

Not applicable
Author

Perfect, will review the script and try from there!

Thanks for your help.