Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vvvvvvizard
Partner - Specialist
Partner - Specialist

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
jonathandienst
Partner - Champion III
Partner - Champion III

>>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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

6 Replies
tresesco
MVP
MVP

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.

jonathandienst
Partner - Champion III
Partner - Champion III

>>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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
vvvvvvizard
Partner - Specialist
Partner - Specialist
Author

The intervals dont overlap

vvvvvvizard
Partner - Specialist
Partner - Specialist
Author

Sample posted

qliksus
Specialist II
Specialist II

So which interval you see as a issue?

rubenmarin

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).