Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
tracycrown
Creator III
Creator III

Grade Condition

Dear all

Please advise how to get the Grade using if-then conditional statement.

Thank You

Tracy

1 Solution

Accepted Solutions
MarcoWedel

Hi,

one possible solution could be to use the intervalmatch function in the script to generate a new grade field in the student table:

QlikCommunity_Thread_141310_Pic1.JPG.jpg

QlikCommunity_Thread_141310_Pic2.JPG.jpg

tabGrade:

LOAD *

FROM [http://community.qlik.com/servlet/JiveServlet/download/652029-136441/Testing.xlsx] (ooxml, embedded labels, table is Grade);

tabStudent:

LOAD *

FROM [http://community.qlik.com/servlet/JiveServlet/download/652029-136441/Testing.xlsx] (ooxml, embedded labels, table is Student);

tabLink:

IntervalMatch (Result)

LOAD Lower,Upper

Resident tabGrade;

Left Join (tabStudent)

LOAD Distinct

  Result,

  Max(Lower) as Lower,

  Max(Upper) as Upper

Resident tabLink

Group By Result;

Left Join (tabStudent)

LOAD Grade,

     Lower,

     Upper

Resident tabGrade;

DROP Table tabLink;

DROP Fields Lower, Upper From tabStudent;

hope this helps

regards

Marco

View solution in original post

4 Replies
jyothish8807
Master II
Master II

Hi Tracy,

.Hopethis is what you want.

Regards

KC

Best Regards,
KC
MarcoWedel

Hi,

one possible solution could be to use the intervalmatch function in the script to generate a new grade field in the student table:

QlikCommunity_Thread_141310_Pic1.JPG.jpg

QlikCommunity_Thread_141310_Pic2.JPG.jpg

tabGrade:

LOAD *

FROM [http://community.qlik.com/servlet/JiveServlet/download/652029-136441/Testing.xlsx] (ooxml, embedded labels, table is Grade);

tabStudent:

LOAD *

FROM [http://community.qlik.com/servlet/JiveServlet/download/652029-136441/Testing.xlsx] (ooxml, embedded labels, table is Student);

tabLink:

IntervalMatch (Result)

LOAD Lower,Upper

Resident tabGrade;

Left Join (tabStudent)

LOAD Distinct

  Result,

  Max(Lower) as Lower,

  Max(Upper) as Upper

Resident tabLink

Group By Result;

Left Join (tabStudent)

LOAD Grade,

     Lower,

     Upper

Resident tabGrade;

DROP Table tabLink;

DROP Fields Lower, Upper From tabStudent;

hope this helps

regards

Marco

tracycrown
Creator III
Creator III
Author

Dear Jyothish Kc

Thanks for your quick response, please advise how to get the same answer but not to hard code the condition ?.

Thank You

Tracy

Date: Fri, 7 Nov 2014 22:56:11 -0500

From: qcwebmaster@qlikview.com

To: tracycrown@hotmail.com

Subject: Re: - Grade Condition

Qlik Community

Grade Condition

reply from Jyothish Kc in New to QlikView - View the full discussion

Hi Tracy,

.Hopethis is what you want.

Regards

KC

Reply to this message by replying to this email, or go to the message on Qlik Community

Start a new discussion in New to QlikView by email or at Qlik Community

Following Grade Condition in these streams:

Inbox

© 1993-2014 QlikTech International AB

Copyright & Trademarks | Privacy | Terms of Use | Software EULA

MarcoWedel

using intervalmatch in the script ...

regards

Marco