Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Sara_3
Creator
Creator

Sum of values (weeks) with Max function

The below is the sample data , when I select Customer it shows the one customer with multiple weeks fields , I need to SUM of weeks values in text box.

The Weeks field consist of :

Max({<[Category Type]={"ABC"},[Weeks]={">0"}>} [ Weeks])

Please help me how I put SUM function with the above Set Analysis to get  SUM of the values.

Output:

SUM of Weeks field in text box:

34 + 23 + 17 ===   74 

74 will be my desire output of this Customer.

 

Customer ID - Status Weeks
101-01 34
101-02 23
101-03 17
Labels (3)
3 Replies
vinieme12
Champion III
Champion III

SUM({<[Category Type]={"ABC"},[Weeks]={">0"}>} [ Weeks])

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Sara_3
Creator
Creator
Author

I need the MAX value of Weeks then I need SUM of all values . Like 34, 23, 17 are MAX values of each status then I need to SUM of all Values . I tried Aggr functiom to SUM but  didn't work.

vinieme12
Champion III
Champion III

Please post some sample data that best represents that your actual dataset

try below

=Sum (AGGR(   Max({<[Category Type]={"ABC"},[Weeks]={">0"}>} [ Weeks]) , Customer) )

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.