Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Aggregation

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?

Labels (1)
1 Solution

Accepted Solutions
Highlighted
Digital Support
Digital Support

Re: Aggregation

See duplicate post: https://community.qlik.com/t5/New-to-QlikView/Aggregation-in-script/m-p/1670016#M385959

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

View solution in original post

2 Replies
Highlighted
Partner
Partner

Re: Aggregation

You have a sample app and also a sample data source?

 

Highlighted
Digital Support
Digital Support

Re: Aggregation

See duplicate post: https://community.qlik.com/t5/New-to-QlikView/Aggregation-in-script/m-p/1670016#M385959

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

View solution in original post