8 Replies Latest reply: Dec 20, 2011 3:22 AM by anubankar

# Multiply string data

Hi

I have a field with values like "25 X 12". I want to create expression where I multiply these 2 values and get result. For e.g. 25 X 12 = 300

How do I do that?

• ###### Multiply string data

Hi anu,

You can use the transformation in script as:

Num(Subfield(Field,'*',1)) * Num(Subfield(Field,'*',2)) AS Field2.

It will calculate value.

Regards

VIjay

• ###### Multiply string data

Hi Vijay

But how can i do it at expression level?

• ###### Multiply string data

Same expression you can use in Expression.

Regards

VIjay

• ###### Multiply string data

Report should have

Item Code

Item Size.

Item size will be 300(multiplication of 25 X 12)

• ###### Multiply string data

Here you can do two things :

1. Create a field ItemSize in Script as I suggested earlier and use that field in you report.

2. You can use expression = (Num(Subfield(Field,'*',1)) * Num(Subfield(Field,'*',2))) in your expression tab.

Regards

VIjay

• ###### Multiply string data

yes. tried this but not working

• ###### Multiply string data
 Itemcode Dimension =SubField(Dimension,'*',1)*SubField(Dimension,'*',2) 1 25*12 300 2 15*10 150 3 20*30 600 4 15*35 525 5 10*50 500

This is what I am getting by using the formula in pivote table with help of  excel

 Itemcode Dimension 1 25*12 2 15*10 3 20*30 4 15*35 5 10*50
• ###### Multiply string data

gr8. Thanks for detailed response. Yes. I got it working...