4 Replies Latest reply on Jul 2, 2016 1:32 PM by Shinichiro Murakami

# Sets and calculated fields

I have created sets for Top25,Top50,Top75  showing Top 25 sales regions.Now I need to use this set in calculated field to find total percentage of sales for each group Top25,Top50 etc.

I am trying to use this formula

SUM([Number of Sales]) for Top25

/

SUM({FIXED [DateMonth] : SUM([Number of Sales])})

how to set this using sets created

If (top25="In" then sum(number of sales)) is not working with sets.

• ###### 1. Re: Sets and calculated fields

IF [top25] = TRUE then sum([number of sales]) END

you may write

IF [top25] then sum([number of sales]) END

both of the expression does the same thing.

• ###### 2. Re: Sets and calculated fields

I meant this way is not working.,we get an error cannot keep boolean and aggregate expression.

IF [top25] then sum([number of sales]) END

• ###### 3. Re: Sets and calculated fields

If attr(top25)="In" then sum(number of Sales) also did not work.Please suggest how to use sets effectively in calculations.So far no luck as I tried multiple ways to get sum of top 25 sales using set.

• ###### 4. Re: Sets and calculated fields

You don't need to put that formula.

Ony put this formula, and put "Set" into Column , Row, or Label.

SUM([Number of Sales])

/

SUM({FIXED [DateMonth] : SUM([Number of Sales])})