Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Create straight table in QlikView script

I want to take this:

id.png

and count each respective distinct key, per key in the YearEventKey table, in a separate table... like this straight table output:

key.png

but I want to do it in the script. I need to be able to add this information to another table while the script is run. Is there a way I can get the distinct keys counted like the straight table but without having to export it as excel and re-import it?

1 Solution

Accepted Solutions
joshabbott
Contributor III

Re: Create straight table in QlikView script

It looks like that table already exists in your script.  Let's pretend it is called Table1:

  Try something like this in your script:

 

Load

  YearEventKey as YearEventKey_Grouping

, count(ID) as CountOfEach
Resident

Table1
GROUP

BY

YearEventKey;

This should create a table in your script with the YearEventKey_Grouping column, then a count column (CountOfEach)

2 Replies
joshabbott
Contributor III

Re: Create straight table in QlikView script

It looks like that table already exists in your script.  Let's pretend it is called Table1:

  Try something like this in your script:

 

Load

  YearEventKey as YearEventKey_Grouping

, count(ID) as CountOfEach
Resident

Table1
GROUP

BY

YearEventKey;

This should create a table in your script with the YearEventKey_Grouping column, then a count column (CountOfEach)

Not applicable

Re: Create straight table in QlikView script

Amazing. It Worked perfectly. Thank you very much. For some reason I didn’t think of counting inside the load script. Much Appreciated.

Community Browser