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

Capturing the selected dimension in a cyclic group

Hi,

      I have a Pie Chart in which I show three dimensions as a cyclic group.Now,What I need is I need to capture as to which particular dimension has

      been clicked.I want to capture the Label given for the dimension corresponding to the dimension for which I am presently viewing the pie chart.

                                                        Please let me know as to how can I achieve this.

1 Solution

Accepted Solutions
yasus
Contributor III
Contributor III

=GetCurrentField([GroupFieldName])

View solution in original post

8 Replies
yasus
Contributor III
Contributor III

=GetCurrentField([GroupFieldName])

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Below code will give you the name of the dimension selected in group.

   Sub Get_Dim

   groups=ActiveDocument.GetGroups

   set fld = groups(0).GetActiveField

   msgbox fld.name

   End Sub

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author


Hi,

   I did do whatever Mr Kaushik and Mr Gregor suggested.

Gregor,

            My Cyclic Group name is Type Group so can I add [Type Group] in the place of [GroupFieldName].

Kaushik,

             Do let me know as to where can I add this Macro.Do I need to add it on all fields present in the cyclic    group.

Regards,

Navin Gorapalli

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

 

    Go to the Module by Ctrl + M

    Click test and then ok

 

    Create a button. Add action -> external -> run macro -> give the macro name as Get_Dim.

    Click Apply.

    Click on button to check the result.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
montubhardwaj
Specialist
Specialist

Hi,

Please see the attached file. The title will change based on your field in the Group. HOpe this is what you are looking for.

Thanks,

Sharma

Not applicable
Author

Hey Guys,

                Thank you for all your help.I have gone with what Gregor had told me and it worked.

   Solanki,

               Thanks for giving in your valuable inputs.Even your Code worked but in whatever discussions I came acoss people have advised not to use a macro if possible.

Regards

Navin Gorapalli  

Not applicable
Author

Hi Navin,

I see that it is solved. Give Gregor's answer as answer and Solanki the helping points..

So that it can be used by others in forum, if they have similar question and also thread can be closed.

Just a suggestion.

Edit: Oops.. I see that you already did it..

Regards

Sravan

Anonymous
Not applicable
Author

Thanks Looking for same solution