Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlikview user
Is it possible to execute a variable through a macro? If so, could you kindly share the code?
I am trying to build my code bit by bit, and wanted to know this part first
Kind Regards
Helen
Not clear when you say execute a variable ? Do you want to read the variable value from a macro ?
Hello
Thank you for replying
1. I have a pivot table which contains a drill down group. Each dimension in the group is a variable. I.e. v1, v2 etc
2. I want to have a button which runs a macro and change the pivot table to display that particular dimension within the group
I have parts of the macro already I.e. This part of the macro cycles through the group. However I want to have a button which skips parts of the cycle group and just jumps straight to particular variables within the Outpatients_View_By_Fields group
SUB setgroup
SET gp = ActiveDocument.GetGroup("Outpatients_View_By_Fields")
gp.cycle 1
END SUB
Are you able to help?
Kind Regards
Helen
Do you actually need to do this using a macro?
It is far better to use native functionality in QlikView to create the application rather than using macros.
You could have multiple charts that you show / or hide based on Actions rather than using a macros for example.
This post is worth reading Macros are Bad
Hi,
I want to ask you a question, Are you using Macro for any specific purpose.
If you are using Macro to just achieve something, then let us know what is it. It may happen that same thing can be achieved without Macro.
Regards,
Kaushik Solanki
Please take a look at the below link and see if it helps...
button to switch dimensions in dimension groups
Set the active field in a cyclic group.qvw
Need help on macro to select group field value
Note: Added second and third link
Hello Colin
I thought a macro would be best, because my pivot table is held within a container and we have opted for a container method to save on memory.
The container has 6 pivot tables within it and each contains the same group called Outpatients_View_By_Fields fr the dimensions. The dimensions within this group also have headings at the top of the page
I wanted to place buttons on each heading at the top of the page, and the macro within these buttons would interact with the pivot table drill down group and change the table to show the correct dimension related to the heading
Can a macro achieve this?
Kind Regards
Helen
Hello Kaushik
I thought a macro would be best, because my pivot table is held within a container and we have opted for a container method to save on memory.
The container has 6 pivot tables within it and each contains the same group called Outpatients_View_By_Fields fr the dimensions. The dimensions within this group also have headings at the top of the page
I wanted to place buttons on each heading at the top of the page, and the macro within these buttons would interact with the pivot table drill down group and change the table to show the correct dimension related to the heading
Can a macro achieve this?
Kind Regards
Helen
A macro is rarely the best solution in QlikView.
You could use expression variables. There are many posts if yous search for expression variables, I would recommend Henric Cronstrom's hic post as a good starting point.
Dear Helan,
Is it possible for you to share qvw app with sample data. Also guide us with example what you are trying to achieve.
Regards,
Kaushik Solanki