3 Replies Latest reply on Jun 17, 2016 11:01 AM by Mahfooj Khan

# Errors summarizing data based on dimension

I'm trying to generate an average calculation, but only if the measure meets a dimension requirement.

My Dimension

IF [Marketing Strategy] = "AS IS" THEN "AS IS"

ELSEIF  [Marketing Strategy] = "REPAIRED" THEN "AS REPAIRED"

END

My Measure

IF ATTR([Strategy]) = "AS IS" THEN SUM([Sales Price])/SUM([EGV])

END

EDIT:  Looks like its the ATTR that is causing it to not sum.  Still not sure the best rout to have the measurement only look at cases that meet the marketing strategy above.

• ###### 1. Re: Errors summarizing data based on dimension

Try this

Measure

SUM(IF [Strategy] = "AS IS" THEN [Sales Price] END)/

SUM(IF [Strategy] = "AS IS" THEN [EGV] END)

Let me know If this help.

Mahfooj

1 of 1 people found this helpful
• ###### 2. Re: Errors summarizing data based on dimension

So this is combining all sales prices then / by sum of all EGV, if strategy is 'AS IS'?  I'm not sure this is what I'm after.  Wouldn't developing the percentage of each cases first, then provide an average of those percentages be most appropriate?

• ###### 3. Re: Errors summarizing data based on dimension

Yeah you are right. Without strategy, measure will return ratio of Sales AND EVG of both "AS IS" and "AS REPAIRED".