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

Totals Time

Hello All,

I am having an issue in calculating the total time:TT.PNG

The sum calculated by qlikview is wrong. Any idea how I can solve this issue.

Many Thanks,

Hasvine

5 Replies
PrashantSangle

Hi,

What is your expression??

and What is your expected output??

Are you looking for avg() or sum()

if you are using straight table then go to Expression tab -> select expression ->Total Mode

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
jonathandienst
Partner - Champion III
Partner - Champion III

If your expression includes a ratio, or some other formula that is handled differently in the total, such as distinct or fabs(), then the expression total will not be the same as sum of rows. For example, in a ratio, sum of ratios (sum of rows total) is not equal to the ratio of the sums (expression total).

If this a straight table, then select the sum of rows option on the Properties | PresentationExpression tab.

If this is a pivot, you will need an expression of the form:

    =Sum(Aggr(<your expression>, <table dim1>, <table dim2>, ...))

If you upload your qvw, or  sample, then you will get more specific help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
PrashantSangle

Hi,

You can also try

Sum(aggr(sum(yourexpression,Dimension1,dim2)))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

Use interval function.

When you use Time function it does not allow you to go beyond 24 hr as total sum.

Try interval

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find attached file for solution.

Sample Data:

NumMap:

LOAD

Hour,

TimeStamp(Timestamp#(Hour, 'hh:mm:ss'), 'hh:mm:ss') AS Time_Formatted

INLINE [

Hour

10:50:30

5:09:30

10:50:30

5:09:55

];

Expression in Straight table:

=If(RowNo() = 0,  Interval(Num(Sum(Time_Formatted)), 'hh:mm:ss'), Sum(Time_Formatted))