Qlik Community

QlikView Documents

Documents for QlikView related information.

Interval Match Feature/Function

Siva_Sankar
Honored Contributor

Interval Match Feature/Function

Hi,  Created a document on Interval Match function. I explained with an example and few advantages of it. Attaching the document along with the QVW file.  Hope you guys find it useful.  Regards. Siva Sankar

Attachments
Comments
Not applicable

Very clear example. thanks

0 Likes
Not applicable

Hi Sivia,

This is a great example!

Have you tried using the same function by combining MDX language with QV syntax? I am trying to build a query where as my first step I am query against a Data Base using MDX language (this works with no problems): 

SELECT

{ null } on 0,

([Account].[H1].[LEV14]) on 1

FROM [Cube];

As my second step I am running the following QV syntax, which is failing because it does not recognize [Account].[H1].[LEV14].

INTERVALMATCH ("[Account].[H1].[LEV14]") LOAD [GL Account Start], [GL Account End] RESIDENT Layout;

IntervalMatch:

Load

distinct

("[Account].[H1].[LEV14]"),

[GL Account Start] & '|' & [GL Account End] as GLStartEnd

resident

IntervalMatchTemp;

drop table IntervalMatchTemp;

Drop table PLTemp;

Drop fields [GL Account Start], [GL Account End] from IntervalMatch;

Please help!

Thank you

0 Likes
MindaugasBacius
Valued Contributor III

In case we also have the new intervals for subjects and few more marks for students:

Grades:

load * inline

[

min, max, grade, subject

0, 20, fail, math

20, 50, bad, math

50, 80, good, math

80, 100, perfect, math

0, 20, fail, history

20, 50, bad, history

50, 100, good, history

];

Marks:

load * inline

[

mark, student, sub

6, steve, math

49, ema, math

77, cate, math

25, joe, math

98, hary, history

];

Data:

IntervalMatch (mark, sub) load

min, max, subject

resident Grades;

How to connect correctly Grades and Marks tables in IntervalMatch that I could get the information like this:

6, steve, math, fail

49, ema, math, bad

77, cate, math, good

25, joe, math, bad

98, hary, history, good

Thank you in advance!

MindaugasBacius
Valued Contributor III

There is the answer IntervalMatch multiple key

0 Likes
Not applicable

Hey dude,

Its really awesome. I expect more document form you like this and can you please show me any reference to learn more thing about interval match..............

0 Likes
Siva_Sankar
Honored Contributor

Its not far away. check here https://community.qlik.com/blogs/qlikviewdesignblog/2013/04/04/intervalmatch

This Community is my all time resource

0 Likes
Siva_Sankar
Honored Contributor
0 Likes
Siva_Sankar
Honored Contributor
0 Likes
Not applicable

Data:

IntervalMatch (mark, sub) load

min, max, subject

resident Grades;

------------------------------------------

you just need to update to:

Data:

IntervalMatch (mark, sub) load

min, max, subject as sub

resident Grades;

0 Likes
beck_bakytbek
Honored Contributor

Hi Shankarece,

Thanks a lot for this Topic, but i have one question, if i load my script, it does work good. but if i see table-viewer, i see 3 synthetic keys. is that normal in your Topic?

Thanks

Beck

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2012-10-25 08:51 AM
Updated by: