Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make conditional sum

DATENAMEKIND OF ACTIVITYSTAR ACTIVITYSTATUSEQUIP NAMETOTAL TIME
31-8-12HELMANM.P22:00OKBTA 105:00
31-8-12ANDRESM.P23:00OKBTA105:00
1-9-12WILMAREMERGENCY08:00PENDINGBTA201:00
1-9-12LEOANRDOTEST07:00PENDINGBTA205:00

In a past question i needed to count the number of activities and that doubt was solved with this:

  =Count({$<Status={"OK"}>}Distinct [Kind of Activity]&[Fecha]&[Equipment Name])

now i need to obtain the sum of activities time that is consigned in the TOTAL TIME column, for example i want to obtain the total time for M.P (KIND OF ACTIVITY column), in the example the result will be 05:00, because i have two records but that is only one activity.

I hope you can help to do that.

Sorry for my english.

8 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

If "Kind of Activity" is the same, will the "Total Time" always be the same?

Not applicable
Author

yes!

Jason_Michaelides
Partner - Master II
Partner - Master II

Try

Max(Total <[KIND OF ACTIVITY]> [TOTAL TIME])

Jason

Not applicable
Author

hello,

I tried your solution and didnt work, this only show me the bigest value on the table, and i need that show the sum of the total time for each activity.

Thank you

Best Regards

Jason_Michaelides
Partner - Master II
Partner - Master II

Can you post your app?

Not applicable
Author

It sounds like you just want a sum of total time per activity, but that would give you a total of 10 hours for M.P. and you said you wanted it to show 5:00. Here is an example of both ways.

Not applicable
Author

Hello,


I tried your solution and didnt work

Thank you

Jason_Michaelides
Partner - Master II
Partner - Master II

You need to provide more information. If Total Time is always the same for each Event then my solution with Max or Avg or Only should be fine. Please either post your app or at least some sample data with an example of output.