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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Set Analysis to Group Records

I have below records in a table

NameDepartmentjob
Name1Dep Ajob1
Name2Dep Ajob1
Name2DepBJob1
Name3DepBjob2
Name3DepBjob2

I want group the names based on department,

Names Dep A only, Names Dep B only, Names both departments in three straight tables.

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

1) {<Name = e({<Department = {'DepB'}>})>}

2) {<Name = e({<Department = {'Dep A'}>})>}

View solution in original post

13 Replies
sunny_talwar

Not sure I understand the output you are looking to get. Would you be able to elaborate on the kind of output you need?

UPDATE: May be this:

Straight Table A uses

{<Department = {'Dep A'}>}

Straight Table B uses

{<Department = {'DepB'}>}


Straight Table C uses no set analysis or

{<Department = {'Dep A', 'DepB}>}

anuradhaa
Partner - Creator II
Partner - Creator II
Author

In Tables 1

Name only DEp A

-------------------------------

Name1

In Tables 2

Names only DEP B

--------------------------------

Name2

In Tables3

Names both Deps

-----------------------------

Name3

sunny_talwar

What is the expression you are using? Add the set analysis I have provided above for each of the table

anuradhaa
Partner - Creator II
Partner - Creator II
Author

I needs Name and job in Straight Table.

Where should i put that set analysis expression?

anuradhaa
Partner - Creator II
Partner - Creator II
Author

I dn't want to do any calculations. i need a table with Name and Job

sunny_talwar

I guess you can add Name as your dimension and following expressions:

1) Only({<Department = {'Dep A'}>} job)

2) Only({<Department = {'DepB'}>} job)

3) Only({<Department = {'Dep A', 'DeptB}>} job)

Kushal_Chawda

Just create single the Table like below, I am not sure why you need 3 tables here

Dimension:

Name

Department

Job

Expression:

Your Expression

Simply create the list box for Department and select the Department you want and see the result in Single straight table instead of 3 tables

Anonymous
Not applicable

Hi Anuradha,

For Dept A:

Aggr(MaxString({<Name = {$(=Count({<Department = {'Dep A'}>} Name)>0)}>} Name),Name)

For Dept B:

Aggr(MaxString({<Name = {$(=Count({<Department = {'Dep A'}>} Name)>0)}>} Name),Name)

For Both:

Aggr(MaxString({<Name = {$(=Count({<Department = {'Dep A','Dep B'}>} Name)>0)}>} Name),Name)

Kind Regards,

anuradhaa
Partner - Creator II
Partner - Creator II
Author

it's not working, can you please share a sample