Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Resolve Synthetic key in interval match

Hi All,

I have aggregated count per request what i want is to create range as per the count

Expected Output:

Request   Count     Range

1              104       101-200

2               207       201-300

3              304         301-400 

4              403         401-500

I can achieve this with interval match but with a synthetic key .

I wish to get rid of this synthetic key

Please find the attached file .

Thanks,

Nishant N

7 Replies
prasadcm
Creator II
Creator II

Hi,

This might help

Interval Match or Inline load

Regards,

Prasad

sunny_talwar

Not sure why you want to get rid of the synthetic key here. If you read HIC's blog here -> IntervalMatch, you would see that this synthetic is not a bad thing to have here

Capture.PNG

If you still think you need to remove it, you can join the IntervalMatch table to one of your tables above to combine the tables into one.

sasiparupudi1
Master III
Master III

Range:

load * inline

[

Count_Min ,Count_Max,Range

101,200, 101-200

201,300, 201-300

301,400,301-400

401,500,401-500

501,600,501-600

];

ScoreDetails:

load * inline

[

    Count , Request

    107, 1

    207, 2

    307, 3

    406, 4

    307,5

    ];

left join(ScoreDetails)

IntervalMatch(Count) load

    Count_Min ,Count_Max   

    Resident Range;

drop Table Range;   

sunny_talwar

Another option:

Range:

LOAD Count_Min + IterNo() - 1 as Count,

  *

While Count_Min + IterNo() - 1 <= Count_Max;

LOAD* Inline [

Count_Min ,Count_Max,Range

101,200, 101-200

201,300, 201-300

301,400,301-400

401,500,401-500

501,600,501-600

];

ScoreDetails:

Right Keep (Range)

LOAD * Inline [

  Count , Request

  107, 1

  207, 2

  307, 3

  406, 4

  307,5

  ];

qlikview979
Specialist
Specialist

Hi,

Please edit your script and write this"Drop Table Range; "

Range:

load * inline

[

Count_Min ,Count_Max,Range

101,200, 101-200

201,300, 201-300

301,400,301-400

401,500,401-500

501,600,501-600

];

ScoreDetails:

load * inline

[

    Count , Request

    107, 1

    207, 2

    307, 3

    406, 4

    307,5

    ];

IntervalMatch(Count) load

    Count_Min ,Count_Max  

    Resident Range;

Drop Table Range;  

jim_chan
Specialist
Specialist

if i drop the table Range. i wouldnt be able to use the Range Field.

What if i want to use the Range field as well?\


Rgds

Jim

Anonymous
Not applicable
Author

Exactly Jim, I need to use Range field as a dimension

Thanks and Regards,

Nishant Nadkarni