Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with IntervalMatch

Hey all, I'm hoping someone can lend a hand. I'm new(ish) to QV, and am trying to set up a date range selection based on the following post by John Witherspoon.

http://community.qlik.com/forums/t/17316.aspx

I downloaded the testDateGrouping2.qvw sample and copied the code from the 'Range Table' tab into my own app, and updated it to use the shipping date column (Ship_Date) that's being loaded in a previous tab:

JOIN (Ranges) IntervalMatch (Ship_Date) LOAD RangeStart, RangeEnd RESIDENT Ranges;

After I reload the data, I can see the Range table with the correct options. ('Today', 'Yesterday', 'This Week', etc.) However, it isn't linked to the actual Ship_Date column from my source table. (I can select a range, but it doesn't restrict the ship dates in my data.)

Am I correct in assuming that I should be able to link the 'Range' selection to any date column by simply updating the argument to IntervalMatch?

I've searched the forums and manuals, and just can't seem to get this to work. I'm sure it's something simple I'm overlooking, but it's eluding me.

Thanks in advance for any help, I do appreciate it!

~Mark

3 Replies
johnw
Champion III
Champion III

It's actually Rob Wunderlich's code. I just modified it based on a specific request.

Yes, I believe you should be able to link the Range selection to any date column by simply updating the argument in the intervalmatch. So yes, it's probably something simple, but I don't really have a guess as to what it might be. If you could post a sample application with the problem, I could debug that, but we already have a working sample application, so I'm not sure how much that would help.

Not applicable
Author

John, thanks for your quick response. (And to Rob for the original code.)

I noticed that the 'Ranges' table doesn't contain the date I'm trying to join on in the IntervalMatch. (It's an 'orphaned' table when I open the table viewer.) That leads me to believe there's an issue with the join.

I tried aliasing the date to see if it's an issue with the format:

date(Ship_Date) AS Range_Date

but I still can't get it to join.

Unfortunately, HIPAA regulations prevent from posting my app without significant modification. (I may have to create one that I can post if I can't figure this out.)

Thanks again,

~Mark

Not applicable
Author

Rookie mistake! With the IntervalMatch code in place, I was unable to refresh the app. (Memory errors.) I was trying to do a Partial Reload, which wasn't enough of a reload to do the join to the Ranges table. (It was enough to create the Ranges table, however.) Once I was able to get on the server and do a complete reload, everything worked as expected.

Hopefully this lesson will prove useful for others, and save some frustration.

Nice functionality Rob!

Thanks,

~Mark