Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
charlesdmeyer
Contributor
Contributor

Inline table help

I have a set of student data that has Test scores.

I want to create an inline table where any score below 20 is called Tier 3, 20 to 45 Tier 2 and 45 to 100 Tier 1.

I can't figure out how to put a formula like that in an inline. 

So typically I would have something like,

[TestPercentile, Segment

<20, Tier 3

<34, Tier 2

etc.

];

Any help would be appreciated.

4 Replies
ychaitanya
Creator III
Creator III

Use an Interval Match Instead .

or use like this

LOAD * INLINE

[

Min_Score, Max_Score,Tier

0,20,Tier1

21,45,Tier2

46,100,Tier3

];

Digvijay_Singh

May be this -

Let i = 0;

For i = 1 to 100

  Table1:

  Load

      Num($(i)) as Score,

      if($(i)<20,'Tier 3',if($(i)<45,'Tier 2','Tier 1')) as Score_Level

  AutoGenerate 1;

Next

sasiparupudi1
Master III
Master III

It is simple enough condition,I would suggest using an IF

If(TestPercentile<20,'Tier 3',If((TestPercentile>=20 AND TestPercentile<45),'Tier 2',If(TestPercentile>=45 AND TestPercentile<101,'Tier1'))) as Tier

Anonymous
Not applicable

I think it's better "Interval Match" this case.