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: 
SK28
Creator II
Creator II

student marks table 1 and remarks to be matched from table 2

student marks table 1 and remarks to be matched from table 2

Student marks in table 1 to be mapped/joined to student remarks in table 2

table1:
Student Marks
A,10
B,20
C,25
D,18

table2:
student remarks
5-11,D grade
12-16,C Grade
17-21,B Grade
22-25,A Grade

I want the table to be mapped or joined using interval match or any other way to get the remarks information
output
student student_marks Remarks
A 10 D Grade

like this i want to have the output, please help

1 Solution

Accepted Solutions
ramchalla
Creator II
Creator II

Hi,

Please check the below if it helps. I have attached the qvw file also.


table1:
LOAD * Inline [
Student,Marks
A,10
B,20
C,25
D,18

];


table2:
LOAD
SubField(MarksRange,'-') as MinMarks,
SubField(MarksRange,'-') as MaxMarks,
remarks
;
LOAD * Inline [
MarksRange,remarks
5-11,D grade
12-16,C Grade
17-21,B Grade
22-25,A Grade

];

Join IntervalMatch(Marks)
LOAD MinMarks, MaxMarks Resident table2;

Left Join (table1)

LOAD Marks, remarks Resident table2;

DROP Table table2;

 

View solution in original post

1 Reply
ramchalla
Creator II
Creator II

Hi,

Please check the below if it helps. I have attached the qvw file also.


table1:
LOAD * Inline [
Student,Marks
A,10
B,20
C,25
D,18

];


table2:
LOAD
SubField(MarksRange,'-') as MinMarks,
SubField(MarksRange,'-') as MaxMarks,
remarks
;
LOAD * Inline [
MarksRange,remarks
5-11,D grade
12-16,C Grade
17-21,B Grade
22-25,A Grade

];

Join IntervalMatch(Marks)
LOAD MinMarks, MaxMarks Resident table2;

Left Join (table1)

LOAD Marks, remarks Resident table2;

DROP Table table2;