7 Replies Latest reply on Mar 20, 2018 7:38 PM by Zhouyi Zhang

# Dimension and Measure in Calculation

I have 1 measure - Price

I have 1 dimensions - Doc type

doc type has values a , b , c , d  , e

I want to calculate sum of price of doc type  ( a , b , c ) in one calculation and sum of price of doc type ( d , e ) in another calculation.

anyone can help with calculation??

attached workbook.

I need to create a scatter plot between price and doc type. so need 2 calculations

• ###### 1. Re: Dimension and Measure in Calculation

Hi Karishma ,

You can do it in many ways , one of them is to create one calculated field and group them as per requirement .

-Nikher

• ###### 2. Re: Dimension and Measure in Calculation

attached workbook in earlier post. I need to create scatter plot so need two calculations

• ###### 3. Re: Dimension and Measure in Calculation

Hi Karishma ,

You can do it by using LOD .

just added one calculated field . In case you are not able to open twbx file as I am using 10.5.1

Here what I have done for "Calculation1"

• ###### 4. Re: Dimension and Measure in Calculation

Hi, Karishma

Have you tried something similar like below?

ZZ

• ###### 5. Re: Dimension and Measure in Calculation

I'm not sure of the exact result you're looking for, but here are the two equations you asked for:

Price - A, B, C

IF [Doc type] = "A"

OR [Doc type] = "B"

OR [Doc type] = "C"

THEN [Price]

END

Price D, E

IF [Doc type] = "D"

OR [Doc type] = "E"

THEN [Price]

END

-Wesley

If this post assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 6. Re: Dimension and Measure in Calculation

I tried this but i get error " cant compare combined fileds with string values"

• ###### 7. Re: Dimension and Measure in Calculation

so what's your combined fields? can you provide a sample workbook?

ZZ