Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am facing a problem,
In my straight table having two fields
teacher | subjects |
ravi | 0 |
anil | 2 |
kumar | 0 |
ravi | 1 |
shiva | 2 |
teja | 2 |
ravi | 2 |
runil | 0 |
ashok | 0 |
In The Table: 1) teacher names are repated
2)subjects belongings to count of teacher
My Requirement : 1) I want remove duplicates in teacher with max(subjects) number required
plz help me ASAP.
Thanks
Data:
LOAD teacher,
subjects
FROM
[https://community.qlik.com/thread/281876]
(html, codepage is 1252, embedded labels, table is @1);
Inner Join(Data)
LOAD
teacher,
max(subjects) as subjects
Resident Data
Group by teacher;
-Rob
Hi Ravi,
may be like this:
Data:
Load * Inline [
teacher ,subjects
ravi ,0
anil, 2
kumar ,0
ravi ,1
shiva ,2
teja ,2
ravi ,2
runil ,0
ashok ,0
];
NoConcatenate
DATA1:
LOAD
teacher,
max(subjects) as subjects
Resident Data
Group by teacher;
Drop table Data;
Thanks,
Arvind Patil
Hi Rob Wunderlich,
Thanks for u r suggestion but I'm getting Student and Teacher different Tables plz
Can you share a screenshot of your table model?
-Rob
Hi Rob Wunderlich,
in table model:
teacher |
ravi |
anil |
kumar |
ravi |
shiva |
teja |
ravi |
runil |
ashok |
--------------------------------------
subjects |
0 |
2 |
0 |
1 |
2 |
2 |
2 |
0 |
0 |
------------------------------------
like this to separate tables
Hi Arvind,
in table model:
teacher |
ravi |
anil |
kumar |
ravi |
shiva |
teja |
ravi |
runil |
ashok |
--------------------------------------
subjects |
0 |
2 |
0 |
1 |
2 |
2 |
2 |
0 |
0 |
------------------------------------
like this to separate tables
This script same as Rob, But Join need to be change like
Data:
LOAD teacher,
subjects
FROM
[https://community.qlik.com/thread/281876]
(html, codepage is 1252, embedded labels, table is @1);
Right Join(Data)
LOAD
teacher,
max(subjects) as subjects
Resident Data
Group by teacher;
What is the link between the teachers and subjects tables?
If you want to do it in the straight table, make your expression max(subjects).