Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to use group by

Hi

I have a dataset

col1 col2   amount  policynumber

01     01       500              45

01    01        600              45

01    02        500              50

01   01        400               50

03   01        800               60

I need to match the col1 and col2 and group

I created a temp table

LOAD * INLINE [

KEY

01-01

01-02;

Table:

Load

------

Where Exists(KEY, [Tran-Type]&'-'& [Acct-Ln]);Where Exists(KEY, [Tran-Type]&'-'& [Acct-Ln]);

now I want to group amount by policy numbers.Here i want to exclude 03 -1 policy number i.e 60

Thanks

Tags (1)
1 Reply
Not applicable

Re: How to use group by

Hi Pavan,

not sure I get what you are after but the below is basically how you would do a group by statement and check col1 vs col2 is equal

Test:

Load

policynumber,

Sum(amount) As amount

Resident Table

Where col1=col2

Group by policynumber

;

hope that helps

Joe