11 Replies Latest reply: Mar 24, 2014 10:18 AM by Claudio Degli Antoni

# Set  Analisys with max and total

Hi all, i woud like show in a pivot table the last order of the season for each customer

The expression works well when I select the customer but when the customer is not selected the result is null

({1<  OTNUOR = {'\$(=Max(OTNUOR))'}>} TOTAL<AANOCO> OTTSTA)

Many Thanks

Claudio

• ###### Re: Set  Analisys with max and total

Hi, Claudio

What aggregation function are you using?.

May it be that the maximum value of OrderId does not have any information for Season?.

If that were the case, a count statement, for instance would provide information:

But a Sum() statement would return null result until you select one customer:

May that be the case?.

Hope it helps.

Best regards.

• ###### Re: Set  Analisys with max and total

Now I have shared one example,

My question was different

I would like to show the hightest value for each season

• ###### Re: Set  Analisys with max and total

hi

the expression doesn't work because

when you use set analysis it like making a selection in the document so the max(orderid) in the set analysis

will give back the max orderid in the whole document and not to each customer

you need to use some sort of if function so it will be calculated for each customer ,

will try to create an example later.

• ###### Re: Set  Analisys with max and total

Hi,

Try this expression

=SubField(MaxString(OTNUOR&'-'&OTTSTA),'-',2)

• ###### Re: Set  Analisys with max and total

No, I need to have the same season in all row

 I would like to see the highest season CUSTOMER1 E11 E14 CUSTOMER1 E12 E14 CUSTOMER1 E14 E14 CUSTOMER1 I13 E14
• ###### Re: Set  Analisys with max and total

Use max season expression as...

=FirstSortedValue(OTTSTA,-OTNUOR)

• ###### Re: Set  Analisys with max and total

I would like the same season in all 4 lines.  "total <CustomerName>"

See the example below

Thanks

• ###### Re: Re: Set  Analisys with max and total

attach is an example

• ###### Re: Re: Set  Analisys with max and total

Many Thanks Liron

Works perfectly

• ###### Re: Set  Analisys with max and total

May be this..

=FirstSortedValue(TOTAL OTTSTA,-OTNUOR)