Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

vvvvvvizard
Contributor III

Interval Match help

I have a table with

Rate:

Load * inline [

Min , Max , Debit_Rate, Credit_rate

.0 , 1000 , 10% , 20%........

];

the rates only apply to monthly total so i loaded my data with group by statement

Load Sum( Amt) as Total_for_month ,

        Debit_Or_Credit

         Month_year,

resident transaction

groub by   Debit_Or_Credit ,Month_year;

interval match(Total_for_month )

load Min ,

Max

resident Rate;

the script runs without errors , but some of the results are incorrect .

Sometimes people pass a second parameter in the interval match , when do i need to do that?

Message was edited by: yusuuf rawat Attachment added Table needs to show on one line eg Merchant , debit , credit , rate1, rate 2 instread of same merchant on 2 lines The values are also incorrect

1 Solution

Accepted Solutions
MVP
MVP

Re: Interval Match help

>>the script runs without errors , but some of the results are incorrect .

Not a lot to go on here, save for guesswork...

Examples and some sample qvw/source files would help.

>>Sometimes people pass a second parameter in the interval match , when do i need to do that?

This is usually for slowly changing dimensions (SCD), where the range is specific to the extra field(s) in the interval match. For more information on SCDs:

In general

Ralph Kimball

6 Replies
MVP
MVP

Re: Interval Match help

Could you share a sample qvw to support your issue described above? Have you checked if your intervals overlapping or not? Overlapped intervals could result a confusing output.

MVP
MVP

Re: Interval Match help

>>the script runs without errors , but some of the results are incorrect .

Not a lot to go on here, save for guesswork...

Examples and some sample qvw/source files would help.

>>Sometimes people pass a second parameter in the interval match , when do i need to do that?

This is usually for slowly changing dimensions (SCD), where the range is specific to the extra field(s) in the interval match. For more information on SCDs:

In general

Ralph Kimball

vvvvvvizard
Contributor III

Re: Interval Match help

The intervals dont overlap

vvvvvvizard
Contributor III

Re: Interval Match help

Sample posted

qliksus
Valued Contributor

Re: Interval Match help

So which interval you see as a issue?

Re: Interval Match help

Hi Yusuuf, I think this sample is working, the issue is because the goup by of the script also uses 'Interchange' field, but this field is not in front-end table.

Try removing this field from the group by clause and Group table (or add it to the front-end table).