Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Gethyn
Creator
Creator

QlikView 8.5 - Selection on sheet open.

Hello everyone.

I have a QlikView where when a certain sheet is opened I would like to have two quarters of the financial year selected so I can view data side by side.

I have it working perfectly if I have the field selectors on screen and manually select the two quarters that I would like. However, I seem to be having difficulty getting my macro to select more than one quarter at a time.

This is what I have at the moment:

Sub ScoreCard()
ActiveDocument.ActivateSheetByID "SH21"
ActiveDocument.GetField("Quarter").Select "2009/10 Q2"
End Sub


Please could anyone advise how I make it select both "2009/10 Q2" and "2009/10 Q3"

Thanks,

Gethyn.

1 Solution

Accepted Solutions
Not applicable

Hi.

For this You have to use toggle select..

sub g()
ActiveDocument.ActivateSheetByID "SH01"
set Y = activedocument.fields("Year")
Y.select "2000"
Y.toggleselect "2001"
Y.toggleselect "2002"
end sub

Try this...

View solution in original post

6 Replies
Anonymous
Not applicable

Hi Gethyn,

Don't know what the reason is you use a macro for making the correct selection?

You could think of using set analysis or something ...

{< Quarter += '2009/10 Q2', Quarter += '2009/10 Q3' >}

Anita

Gethyn
Creator
Creator
Author

Hi Anita,

Thanks for the speedy reply.

I'm not sure that set analysis is what I need as all I want is to have it select the two quarters as the default selection when the sheet is opened.

Gethyn.

Anonymous
Not applicable

You could add a macro to clear all selections when entering the sheet.

And in set analysis you could add the default selection ... this to be sure the selection is always correct.

Ofcourse it can be done in the macro aswell ... just depends on what goals you have.

Not applicable

Hi.

For this You have to use toggle select..

sub g()
ActiveDocument.ActivateSheetByID "SH01"
set Y = activedocument.fields("Year")
Y.select "2000"
Y.toggleselect "2001"
Y.toggleselect "2002"
end sub

Try this...

Gethyn
Creator
Creator
Author

Hi Blessy,

That worked perfectly and did exactly what I wanted.

Thanks,

Gethyn.

Not applicable

Welcome....