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: 
lmonincx
Creator II
Creator II

how to put an >200906 <=$(variable) into a select macro

Hi,

I am looking for a way to use a select. macro to select a certain range of date.

in the attached qvw it's picking up the 201002 period, but I would like to have a formula which is always using >200906 and <= ( content of a variable which is giving back the content of the field LastYearMonth ( or the variable V1)

I tried but couldn't get it to work, has anyone an idea?

any help is appreciated!

Linda Monincx

1 Solution

Accepted Solutions
Not applicable

hi Linda,

try this:

sub period
Last = ActiveDocument.Variables("v1").GetContent.String
First = "200906"
mySelect= ">" & First & " <" & Last

ActiveDocument.Fields("YearMonth").Select mySelect
end sub

Alex

View solution in original post

2 Replies
Not applicable

hi Linda,

try this:

sub period
Last = ActiveDocument.Variables("v1").GetContent.String
First = "200906"
mySelect= ">" & First & " <" & Last

ActiveDocument.Fields("YearMonth").Select mySelect
end sub

Alex

lmonincx
Creator II
Creator II
Author

HI Alex,

Many thanks that was the syntax i was looking for Big Smile

Kind regards,

Linda Monincx