Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Marco Date Selection

Hello

I like to do an report and therefor I need a macro.

My method:

I select some dates. For example: in a chart / Q1-2015 / Q4-2014 / Q3-2013/ Q2-2013.

now I have a macro for this BUT: I like to a dynamic selection I Select Q4-2014 and than they give me a selection with all Quarter after Q4-2014

At the moment:

ActiveDoucment.GetSheetObject("CH41609").Attach

ActiveDocument.Fields("QuarterFY").Selcet "2015-Q1"

ActiveDocument.Fields("QuarterFY").ToogleSelect "2014-Q4"

ActiveDocument.Fields("QuarterFY").ToggleSelect "2014-Q3"
ActiveDocument.Fields("QuarterFY").ToggleSelect "2014-Q2"

work perfect but I like a dynamic selection.

I hope someone can help me:)

4 Replies
ramoncova06
Specialist III
Specialist III

sorry but fact that you need a report does not mean you need a macro

unless you want to export it to an external source and you do have an nprinting license

Macros are Bad

Not applicable
Author

HI:) I know what you like to say but I like to do that simple as possible.

After I selected the dates I detach the charts - its only possible for me to this with a macro.

There no other way.

maybe you have a other solution?

Not applicable
Author

i found this:

ActiveDocument.GetSheetObject("*").Attach

ActiveDocument.GetField(“*”).Select

ActiveDocument.Evaluate(“‘>’ & date(today(1)-7)”)

ActiveDocument.GetSheetObject("").Detach

but doesnt work...

ramoncova06
Specialist III
Specialist III

check this link it might have a macro that you need

Useful Qlikview Macros

though I would rather understand why do you detach the graphs, you might be able to get the same behavior that you need if you just modify some of the expressions that you use