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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

dynamic interval match

// INTERVALS

Intervals:
LOAD * INLINE [
StartValue, EndValue, Buckets
0, 100, 1
100,200, 2
300,99999, 3
];

// INTERVALMATCH_TABLE

intervalmatch (Frame)
Load StartValue,EndValue resident Intervals;

This is a standard intervalmatch example

the problem is that i want to intervalmatch an AVG value based on the current selection. i dont know if this is possible. AVG is calculated every time a different selection is made .. so i cant do this during loading.

my question: is realtime interval match possible .. and how

Labels (1)
4 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

well, since INTERVALMATCH is a function that belongs to the script, it's not available in the run-time (or "real-time" as you say). I think you can reach a desired result using Set Analysis - if you look at the last example in the "Set Analysis" article, it shows a set analysis expression based on a result of an aggregation.

cheers,

Oleg

Ask me about Qlik Sense Expert Class!
johnw
Champion III
Champion III

Something like this?

=if(avg(...)<=100,dual( '0-100',100)
,if(avg(...)<=200,dual('101-200',200)
,if(avg(...)<=300,dual('201-300',300)
,dual('301+' ,999))))

amien
Specialist
Specialist
Author

John,

Thanks again for your reply .. that nice .. but how do i connect that to a listbox where i can select the values:0-100, 101-200 etc?

johnw
Champion III
Champion III

Try using the same expression in a list box. Create a new list box. On the general tab, under Field, select <Expression>. Enter the expression. I think it will work, and dynamically adjust based on your other selections, but I could be wrong. Worth a try.