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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
pascos88
Creator II
Creator II

Sum(value) in different hour

Hello everyone,

I have the hour field and for each 15 minuts a value.

I need to sum the value for each hours. In the immage attached for example I need to have a value 0.21 for 09, 0.62 for 10 etc.

Thanks for any help

Pasquale

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be use a calculated dimension:

Calculated Dimension: Hour(Hour)

Expression: Sum([KWh Real])

View solution in original post

5 Replies
sunny_talwar
MVP
MVP

May be use a calculated dimension:

Calculated Dimension: Hour(Hour)

Expression: Sum([KWh Real])

swuehl
Champion III
Champion III

Just replace your currently used dimension with a calculated dimension:

=Hour( YourHourField)

rubenmarin
MVP
MVP

Hi Pascuale, you can create a dimension with only the hour part:

Hour(Time_Field)

Can be a calculated dimension or a field created in script.

Then just an expression like Sum(Value_Field) should return the values grouped by hour

sunny_talwar
MVP
MVP

Alternatively, calculate Hour in the script

SET TimeFormat='hh:mm';

Table:

LOAD Hour as Time,

  Hour(Hour) as Hour,

  [KWh Real] 

Inline [

Hour, KWh Real

09:00, 0.01

09:15, 0.03

09:30, 0.06

09:45, 0.11

10:00, 0.16

10:15, 0.30

10:30, 0.14

10:45, 0.02

];


Capture.PNG

Anonymous
Not applicable

Hi,

try

in  your  dimension Hour(hour) ,

in your expessions Sum([KWh Real])

time.JPG

Regards.