Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can anyone help with my script (I am a newbie on QlikView) below.
I am getting an error in the expression sum([Project Revenue] / sum([Hours Quantity]. Why?
thanks!
//*****Work*****
Work:
LOAD
[Project Number],
[Project Name],
[Project Type],
[Customer Name],
[Full Name] as Employee,
[Prod Unit Code],
Skill,
[Hours Quantity],
[Task Name],
[Task Number],
[Expenditure Type],
[Bill Rate],
[Cost Rate],
[Project Revenue],
[Project Cost],
Month,
[Project Revenue]-[Project Cost] as Contribution
FROM
[..\reformatted\Weekly CSD September_Aug_dummydata.xlsx]
(ooxml, embedded labels, header is 3 lines, table is [Rapport 1]);
Join (Work)
LOAD [Project Number],
sum([Project Revenue])/sum([Project Revenue]) as COR
Resident Work;
Hi Gordaman,
The first thing I see is sum([Project Revenue])/sum([Project Revenue]) as COR this is twice the same variable.
If you want sum([Project Revenue]) you should use an aggregation variable.
Below resident you type group by.
Hope this is helpful.
gr.
Frank
No comma at end?
Hi,
In general when you use sum or count or ...
Also you must to use group by
I suggest you review help LOAD
Good luck, Luis
Hi Gordaman,
The first thing I see is sum([Project Revenue])/sum([Project Revenue]) as COR this is twice the same variable.
If you want sum([Project Revenue]) you should use an aggregation variable.
Below resident you type group by.
Hope this is helpful.
gr.
Frank
use group by in resident table like below
//*****Work*****
Work:
LOAD
[Project Number],
[Project Name],
[Project Type],
[Customer Name],
[Full Name] as Employee,
[Prod Unit Code],
Skill,
[Hours Quantity],
[Task Name],
[Task Number],
[Expenditure Type],
[Bill Rate],
[Cost Rate],
[Project Revenue],
[Project Cost],
Month,
[Project Revenue]-[Project Cost] as Contribution
FROM
[..\reformatted\Weekly CSD September_Aug_dummydata.xlsx]
(ooxml, embedded labels, header is 3 lines, table is [Rapport 1]);
Join (Work)
LOAD [Project Number],
sum([Project Revenue])/sum([Project Revenue]) as COR
Resident Work group BY [Project Number],;
Thanks everyone! I got it working now!