Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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?

1 Solution

Accepted Solutions
vijay_iitkgp
Partner - Specialist
Partner - Specialist

ItemcodeDimension=SubField(Dimension,'*',1)*SubField(Dimension,'*',2)
1                         25*12300

2

15*10150
320*30600
415*35525
510*50500

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

ItemcodeDimension
125*12
215*10
320*30
415*35
510*50

View solution in original post

8 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

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

Not applicable
Author

Hi Vijay

Thanks for your quick reply.

But how can i do it at expression level?

vijay_iitkgp
Partner - Specialist
Partner - Specialist

Same expression you can use in Expression.

Can you please explain what should be your output table/chart .

Regards

VIjay

Not applicable
Author

Report should have

Item Code

Item Size.

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

vijay_iitkgp
Partner - Specialist
Partner - Specialist

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

Not applicable
Author

yes. tried this but not working

vijay_iitkgp
Partner - Specialist
Partner - Specialist

ItemcodeDimension=SubField(Dimension,'*',1)*SubField(Dimension,'*',2)
1                         25*12300

2

15*10150
320*30600
415*35525
510*50500

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

ItemcodeDimension
125*12
215*10
320*30
415*35
510*50
Not applicable
Author

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