Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

creating a new table in script

Hi all,

first of all thanks for any help.

below is a load script of 4 different tables and a formula that works in a table, the formula uses all 4 tables. Time is the dimension.

all I want really is in the load script a new table with 2 fields, the first is Time and the second is that formula.

Regards,

              Sam

LOAD
Date,
Time(Time,'hh:mm') as Time,
hour(Time) as [Hour of Day],
[Speed(Lane 1)],

FROM

 

(qvd);

 


concatenate(Nox)
LOAD [Vehicle type] as [Vehicle Type],
[Fuel / Size],
Fuel,
Size,
[Euro standard],
[Average speed (km/h)],
[NOx EF (g/km)]
FROM

(
ooxml, embedded labels, table is LGV);

 


[On road Composition]:
LOAD [Vehicle Type],
[Hour of Day],
[Vehilce Type Ratio]
FROM

(
ooxml, embedded labels, table is [Hour of Day]);

[Euro Class breakdown]:
LOAD
if([Vehicle Type] = 'Diesel LGV' ,'LGV',[Vehicle Type]) as [Vehicle Type],
Year,
[Euro 1],
FROM

(
ooxml, embedded labels, table is [Vehicle Type]);

(([Flow(Lane 1)]*avg(if( [Hour of Day] = [Hour of Day] and [Vehicle Type]= 'Rigid' ,[Vehilce Type Ratio]))*avg(if( [Hour of Day] = [Hour of Day] and [Vehicle Type]= 'Rigid',[Euro 1])) *avg(if([Average speed (km/h)] = [Speed(Lane 1)] and [Vehicle Type] = 'Rigid' and [Euro standard] = 'Euro I', [NOx EF (g/km)])))

0 Replies