5 Replies Latest reply: May 13, 2015 3:38 PM by Massimo Grossi

# Set Analysis Issue

Hello - I can't get the syntax in this expression to work with set analysis. Does anyone see an issue?

(({\$<[Test1] = {"Apple"}>}[Test1]) - {\$<[Test1] = {"Orange"}>}[KPD_KPI_ID]+ ({\$ <[Test1] = {"Apple"}>}[Test1])) / ({\$ <[KPD_KPI_ID] = {"Orange"}>}[Test1])

• ###### Re: Set Analysis Issue

there is no function (sum, avg, count, etc....)

sum({\$<Region={USA}>} Sales)

also I don't understant your requirement? could you explain?

• ###### Re: Set Analysis Issue

I don't see any sum/count/min/max in your expression???

(({\$<[Test1] = {"Apple"}>}[Test1]) - {\$<[Test1] = {"Orange"}>}[KPD_KPI_ID]+ ({\$ <[Test1] = {"Apple"}>}[Test1])) / ({\$ <[KPD_KPI_ID] = {"Orange"}>}[Test1])

This part needs to be something like this:

({\$<[Test1] = {"Apple"}>}[Test1]) - > Sum/Count/Min/Max/Only({\$<[Test1] = {"Apple"}>}[Test1])

and similarly all the individual parts would need a aggregation in the expression.

HTH

Best,

Sunny

• ###### Re: Set Analysis Issue

Hi Sunindia, thank you for helping! Do you see an issue with this set analysis syntax? its not working either

Sum ({\$<[X] = {"Internal", "Store"}, [Plant] -= {"Test”}>}[ABC])/ Sum ({\$ <[X] = {"Internal", "Store"}, [Plant] -= {"Test”}>}[ABC])

• ###### Re: Set Analysis Issue

Only thing you can try to change here would be replacing the double quotes with single quotes:

Sum({\$<[X] = {'Internal', 'Store'}, [Plant] -= {'Test'}>}[ABC]) / Sum({\$<[X] = {'Internal', 'Store'}, [Plant] -= {'Test'}>}[ABC])

I am assuming that X, ABC are all dummy, so when you replace them with the actual do make sure to check for upper case and lower case as everything in here will be case sensitive.

Best,

Sunny

• ###### Re: Set Analysis Issue

what's the meaning of your last expression; it seems the result should be 1?

Sum ({\$<[X] = {"Internal", "Store"}, [Plant] -= {"Test”}>}[ABC])

/

Sum ({\$<[X] = {"Internal", "Store"}, [Plant] -= {"Test”}>}[ABC])