Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

attach is an example

View solution in original post

11 Replies
arsal_90
Creator III
Creator III

Share your sample qvw

Luis_Cortizo
Former Employee
Former Employee

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:


Capture.PNG.png


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


Capture.PNG.png


May that be the case?.


Hope it helps.


Best regards.

Not applicable
Author

Thank you for your attention

Now I have shared one example,

My question was different

I would like to show the hightest value for each season

lironbaram
Partner - Master III
Partner - Master III

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.

Not applicable
Author

Hi,

Try this expression

 

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

Not applicable
Author

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

                    

                           

I would like to see the highest season
CUSTOMER1E11E14
CUSTOMER1E12E14
CUSTOMER1E14E14
CUSTOMER1I13E14
MK_QSL
MVP
MVP

Use max season expression as...

=FirstSortedValue(OTTSTA,-OTNUOR)

Not applicable
Author

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

See the example below

Thanks

MK_QSL
MVP
MVP

May be this..

=FirstSortedValue(TOTAL OTTSTA,-OTNUOR)