Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group items in a dimension table

Hi

I have a dimension table in my script and I want to group the data items so if i have:

Expense AE

Expense AA

Expense AC

These should appear in Expense A

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Ok in your load statement put a code like this

If(Match(Category,'ATFAO','ATFUO'),'Out',Category) as NewCat

By this your 'ATFAO','ATFUO' are goes to Out category as what ever you want and other is same category. In the same above you can add for others category also what ever you decide i done here for category field.

Hope this helps

View solution in original post

15 Replies
its_anandrjs
Champion III
Champion III

this are the fields or the table names

Not applicable
Author

these data lines in a table. 

its_anandrjs
Champion III
Champion III

Write like for new field type

if( Match(Yourfieldname,'Expense AE','Expense AA','Expense AC'),'Expense A','Other') as NewFieldtype

Not applicable
Author

is this in the script?

its_anandrjs
Champion III
Champion III

Yes in the load script like

if( Match(Yourfieldname,'Expense AE','Expense AA','Expense AC'),'Expense A','Other') as NewFieldtype


and in dimension or expression


=if( Match(Yourfieldname,'Expense AE','Expense AA','Expense AC'),'Expense A','Other')

Not applicable
Author

ok thanks.

What about if i have many to of this so as above but also Expense AB, Expense AF AS Expense C

its_anandrjs
Champion III
Champion III

If possible provide some sample data for this.

Not applicable
Author

LocalPointOfDelivery

LocalPointOfDeliveryDescription

Category

A&E

A&E

AE

All

All

AL

ATFAO

Attended Outpatients - first attendance

ATFAO

ATFUO

Attended Outpatients - follow up

ATFUO

ATOP

Outpatient Attendances excl DNA

ATOP

CC

Critical Care

AL

COM

Community

AL

DA

Direct Access

DIR

DC

Daycase

DC

ELIP

Elective Inpatient

EIP

IP

All in-patients

IP

NEL

Non Elective Inpatient

NEIP

OP

Outpatient Attendance

OP

OPFA

Outpatients FA

ATFAO

OPFU

Outpatients FU

ATFUO

OTH

Other

AL

WA

Ward attenders

OP

So in the above

I want AFAO, AFTUO to be under Out, and the all others as they are.  This will then want to be be in a list object as a filter.

its_anandrjs
Champion III
Champion III

In which column that is Category