
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SUM Expression on qliksense
Hi
I'm struggling with to produce a chart using the SUM expression on qliksense. I have a table
User Hours Minutes
Victor 1 30
Jack 2 00
Victor 3 00
I'm trying to do a sum of all the users and it doesn't seem to be as simple as SUM(hours). Can anyone please help me with this expression?
Kind Regards
Accepted Solutions

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is hours is in number format or text format?
Try like this
Data:
LOAD
Num(Hours) AS Hours,
Num(Minutes) AS Minutes,
User
FROM DataSource;
Now use Sum(Hours)
Hope this helps you.
Regards,
jagan.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What are you seeing when you do Sum(Hours) -> Make sure you are using the correct casing for hours fields (in QlikView and Qlik Sense Hours is different from hours)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, I'm using a capital H for Hours. do you suggest I change all the headings to small letters In the the excel spreadsheet?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No you don't have to. I just wanted you to make sure that you are using the correct case. What output do you see when you do Sum(Hours)?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I wanted to see the chart of the sum of hours each user has spent on a project

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is hours is in number format or text format?
Try like this
Data:
LOAD
Num(Hours) AS Hours,
Num(Minutes) AS Minutes,
User
FROM DataSource;
Now use Sum(Hours)
Hope this helps you.
Regards,
jagan.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use MakeDate to do this.
e.g :
Qlikcommunity:
Load * Inline
[
User, THour, Minutes
AA, 1, 30
BB, 2, 00
CC, 3, 30
];
Qlikcommunity1:
Load *,
Hour(THour) as THourr,
Minute(Minutes) as Minutess,
MakeTime(THour,Minutes) as NewTime
Resident Qlikcommunity;
drop Table Qlikcommunity;
Thanks,
Brijesh


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
try using this
num#(Hours) as Hours and then use sum(Hours) as the expression.
Thanks,
Sangram

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi do i change the hours title on the spreadsheet to the num#(hours)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Victory Obi,
You don't have to change the title in the spread sheet.
I wont you to make use of num#() function on the Hours fields in the load statement. This will convert a string to number.
so use this:
load x,
y,
num#(Hours) as Hours
from [LIB:\\.....\..];
Thanks,
Sangram.
