Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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)
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?
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)?
Hi, I wanted to see the chart of the sum of hours each user has spent on a project
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.
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
Hi,
try using this
num#(Hours) as Hours and then use sum(Hours) as the expression.
Thanks,
Sangram
Hi do i change the hours title on the spreadsheet to the num#(hours)
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.