Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following tables loaded in the script
Vehicle:
LOAD VehicleKEY,
VehicleCode,
[Vehicle Primary Type],
[Vehicle Secondary Type]
FROM Vehicle.qvd
Activity:
LOAD Activity,
[Activity Key]
FROM Activity.qvd
Employee:
Load EmployeeKEY,
[Employee Type]
From Employee.qvd
Time:
Load TimeKEY,
Hour,
[15 min Interval]
From Time.qvd
[Fact Data]:
LOAD Date,
EmployeeKEY,
VehicleKEY,
TimeKEY,
Area,
Group
[Time in Seconds],
[Activity Key]
FROM Data.qvd
From this data, I am reporting Two Metrics with the expressions below:
Average Vehicle Count:
AVG(AGGR(
(count({<[Vehicle Primary Type]={'SUV'},Activity ={'Logged'},[Vehicle Secondary Type]={'Manual','Auto'},[Employee Type]-={'Not Available'}>}VehicleCode)
+
count({<[Vehicle Primary Type]={'Hatch'},Activity ={'Logged'},[Vehicle Secondary Type]={'Manual','Auto'},>}VehicleCode))
,[15 min Interval],Date))
Logged Time/day:
Interval(
(sum({< Activity = {Logged},Group={S},[Employee Type]-={'Not Available'}>}
[Time in Seconds]/86400)
/
count(Date))
,'hh:mm:ss')
I want to replicate this in the script itself. Is it possible? Because the data is too big and it is taking long time to load the chart. Can someone please help me with the script?
I would recommend checking out the posts in the Design Blog area, this is likely going to be your best bet outside a consulting engagement to have someone help you with things. The fact nobody else has responded would lead me to believe folks wanted to have some actual sample data to play with etc., but then again, this one may be fairly complex to sort out in the script too with limited use case info.
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
There are over 700 posts in the above area, so this may provide you with some ideas on how to go about things, but it may take some searching to find the ones that will actually give you the right ideas. Sorry I do not have something better for you.
Oh, you could also have a look at Rob W's Cookbook pages, he may have some further examples of things too:
Regards,
Brett
See duplicate post: https://community.qlik.com/t5/New-to-QlikView/Aggregation/m-p/1672806/highlight/false#M386257
Regards,
Brett