Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Shahith
Contributor III
Contributor III

Time intervals as Filter

Hello,

I have a field that contains time in 10 minutes interval.

Using that field I made two other columns in the interval of 30 minutes and one hour.

Now, how can i bring all 3 columns (10min, 30min, 1hr interval) into one filter chart, for eg. when the user selects 30 min interval, the line chart i made should change to 30min interval.

Note: I have another filter for the same line chart with the date column to select the date.

Any help would be greatly appreciated.

 

Labels (3)
1 Solution

Accepted Solutions
brunobertels
Master
Master

Hello 

clik on the variable panel ( bottom left of screen ) add new variable and name it vInterval

use variable button object 

name it choose vInterval

show as : button

value fixed 

add value : 

for Value : 1

label 10 mm 

Add value 

For value : 2

label 30 mm

add value 

for value : 3

label 60mm

You may have this  :

brunobertels_0-1706701973873.png

 

then in your graph for dimension add this mesure 

=if($(vInterval)='1',
Field_10mm,
if($(vInterval)='2',
Field_30mm,
if($(vInterval)='3',
Field_60mm)))

 

so the dimension of your graph will change dinamically 

 

Hope it helps 

 

View solution in original post

2 Replies
brunobertels
Master
Master

Hello 

clik on the variable panel ( bottom left of screen ) add new variable and name it vInterval

use variable button object 

name it choose vInterval

show as : button

value fixed 

add value : 

for Value : 1

label 10 mm 

Add value 

For value : 2

label 30 mm

add value 

for value : 3

label 60mm

You may have this  :

brunobertels_0-1706701973873.png

 

then in your graph for dimension add this mesure 

=if($(vInterval)='1',
Field_10mm,
if($(vInterval)='2',
Field_30mm,
if($(vInterval)='3',
Field_60mm)))

 

so the dimension of your graph will change dinamically 

 

Hope it helps 

 

Shahith
Contributor III
Contributor III
Author

Thank you so much, Bruno, It worked perfectly as expected!!