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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selection in Chart

I have a field called Plan under which i have many plans. The same field i have used for creation of two charts where that plan is used as dimension.

Now if i select a Plan in Chart 1 i want that to take me to other sheet but if i select the same plan in chart2 i want to remain in the same sheet. how that can be done ??

I have attached a sample QVW file. Right now selection in both the chart is taking me to next sheet. I want only chart 1 to take me to next sheet.

1 Solution

Accepted Solutions
Not applicable
Author

I used this code and its working fine.
sub abc



if ActiveDocument.GetSheetObject("CH01").IsActive then

set x = ActiveDocument.GetCurrentSelections

s = x.Selections

v = x.VarId

for i = lbound(s) to ubound(s)

if v(i) = "Plan" then

ActiveDocument.ActivateSheetByID "SH02"

end if

next

end if



end sub
But can i do it without using macro

View solution in original post

3 Replies
Not applicable
Author

Hey,

Find the attachment.Is that you looking for

Thanks,

Jai

Not applicable
Author

No,

My requirement is that when i click on any plan in Chart 1 it shouls take me to next sheet and if i click on any plan in chart 2 it should remain in the same sheet.

Not applicable
Author

I used this code and its working fine.
sub abc



if ActiveDocument.GetSheetObject("CH01").IsActive then

set x = ActiveDocument.GetCurrentSelections

s = x.Selections

v = x.VarId

for i = lbound(s) to ubound(s)

if v(i) = "Plan" then

ActiveDocument.ActivateSheetByID "SH02"

end if

next

end if



end sub
But can i do it without using macro