If the list of branches will not change over time (or will change very infrequently, so that you can manually update your cube model when it does), you might consider manually specifying the members for the Branch level, as documented here.
If you do this, keep in mind that the Analyzer adds the NON EMPTY keyword to many MDX queries by default, which will prevent members with no data from being shown in the resulting pivot table. You may need to remove this keyword from MDX queries where you want the members with no data to show up.
The KPI doesn't need to be the data source for the widget. You can specify the KPI class as the actionClass for a cube (this is an attribute of a <cube> element) and then the actions in it will be available to pivots based on that cube. That will in turn make those actions available as controls on widgets whose data source is a pivot based on that cube.
If the data source for a widget isn't a pivot or a KPI, I'm not sure whether it's possible to use custom actions on that widget.
Please take a look at the documentation on custom actions. You will need to create a KPI class and define the actions you want to make available in it. You can then add widget controls that correspond to these actions. For a real-world example that includes an action to rebuild a cube, take a look at this class from the CubeEventMonitor.
I think you know this, but to clarify for other readers - this allows developers to write any methods they would like and end-users to execute the defined methods at any time. It doesn't allow end-users to define and execute arbitrary methods of their own.
Log in or create a new account to continue