Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor III

Interval match - Sync tables

Hi,

i am using interval match to create groups for a Age Column.

Age in years  is prsent in the Fact table. I created a intervalmatchtable. and defined the Start and End Age for the Range bukets.

I then used the intervalmatch function to calculate the Range group for the Fact table.

The data is coming fine and i am getting the rows falling into the correct range group.

but when i check the table model, there are sync tables getting created due to this. I would like to keep the model clean and want to remove these sync tables. How to achieve this.

IntervalMatchTable:
LOAD * INLINE [
    AgeGroupSort, AgeGroup , Start , End
    1, Less than 6 months , 0.01  , 0.6
2, 6 months to 1 year , 0.601 , 1 
3, 1>3 year    , 1.01 , 3 
    4, 3>6 year    , 3.01 , 6 
    5, 1>8 year    , 6.01 , 8 
    6, 1>10 year   , 8.01 , 10
    7, 1>12 year   , 10.01 , 12
    8, >12 year    , 12.01 , 999
    9,   NA       , 0,0
];


IntervalMatch([Patient Age in years]) Load Start, End Resident IntervalMatchTable;

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Interval match - Sync tables

Heyyy ,

           Add the below line in your  script, above this line "IntervalMatch([Patient Age in years]) Load Start, End Resident IntervalMatchTable;"

           INNER JOIN(IntervalMatchTable)

so your script will be as follows:

       

             

IntervalMatchTable:
LOAD * INLINE [
    AgeGroupSort, AgeGroup , Start , End
    1, Less than 6 months , 0.01  , 0.6
2, 6 months to 1 year , 0.601 , 1 
3, 1>3 year    , 1.01 , 3 
    4, 3>6 year    , 3.01 , 6 
    5, 1>8 year    , 6.01 , 8 
    6, 1>10 year   , 8.01 , 10
    7, 1>12 year   , 10.01 , 12
    8, >12 year    , 12.01 , 999
    9,   NA       , 0,0
];

INNER JOIN(IntervalMatchTable)


IntervalMatch([Patient Age in years])

Load Start, End Resident IntervalMatchTable;

Regards,

Nilesh Gangurde

View solution in original post

2 Replies
Highlighted
Partner
Partner

Interval match - Sync tables

Heyyy ,

           Add the below line in your  script, above this line "IntervalMatch([Patient Age in years]) Load Start, End Resident IntervalMatchTable;"

           INNER JOIN(IntervalMatchTable)

so your script will be as follows:

       

             

IntervalMatchTable:
LOAD * INLINE [
    AgeGroupSort, AgeGroup , Start , End
    1, Less than 6 months , 0.01  , 0.6
2, 6 months to 1 year , 0.601 , 1 
3, 1>3 year    , 1.01 , 3 
    4, 3>6 year    , 3.01 , 6 
    5, 1>8 year    , 6.01 , 8 
    6, 1>10 year   , 8.01 , 10
    7, 1>12 year   , 10.01 , 12
    8, >12 year    , 12.01 , 999
    9,   NA       , 0,0
];

INNER JOIN(IntervalMatchTable)


IntervalMatch([Patient Age in years])

Load Start, End Resident IntervalMatchTable;

Regards,

Nilesh Gangurde

View solution in original post

Highlighted
New Contributor III

Interval match - Sync tables

Thanks Nilesh, this worked.