Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i am having a problem with an expression i am using in the LOAD script:
I have a field "Time spent (hours)". I have another field "Hours per Day".
If a wwant to calculate "Time spent (days)" i am doing the following in my LOAD:
round([Time spent (hours)] / [Hours per Day]).
I use round() because i want to have a full number.
In case of the following:
"Time spent (hours)" = 184
"Hours per Day" = 8
the result is 22 - although it should be 23.
if i do something like this:
sum(round([Time spent (hours)] / [Hours per Day]).)
i get an error wen executing the script.
Thanks for some help!
Regards,
K
I do get 23. Can't reproduce your problem:
LOAD *,
round([Time spent (hours)] / [Hours per Day]) as Test
INLINE [
Time spent (hours),Hours per Day
184,8
];
yeah even i am getting the same as swuehl !
Hi ,
from where are you loading excel,qvd
are you using
round([Time spent (hours)] / [Hours per Day]) in ur expression in chart
in that case go to number check number format.
Thanks
anant
May be your field shows you "hours" but it may also contains "minutes" that QV doesn't show you according to your number format.
Test :
Round(Round([Time spent (hours)]) / Round([Hours per Day]))
hiii
b:
LOAD *,
round([TimeSpent hours]/[time spent per day])as full;
a:
LOAD * INLINE [
TimeSpent hours, time spent per day
184, 8
];
i got 23