Watch the video demonstration of using MDX in Caption, Condition and Expression for Action. This is Part 2 of 2 parts series about Tabular Action.
In the last post we have seen how to create simple Drillthrough, URL and Report actions for Tabular Model using BIDSHelper. In this post we will enhance and enrich those actions using MDX captions and conditions.
Tip: Creating actions that properly works can be unnerving for the first time, so always take baby steps. First create a simple action without and MDX Caption and Condition and then work your way up one by one. Test it and then move on to next steps.
Caption is MDX
There is a property checkbox to set True or False. If False, then you can type the caption to be displayed for the action in Client application. That we already did inlast post. The caption text that we used was “URL Action…, Drillthrough Products… etc”
If True, then need to provide MDX Expression that returns a string for the caption. Keep in mind that if the MDX expression is wrong, then the action will not be available.
This section is optional while creating Actions. You need to provide MDX expression that describes an optional condition, used in conjunction with Measure group members, which will restrict the availability of action. The expression must return Boolean value – True/False to indicate that action is available.
For more about other options while creating Actions, please refer to MSDN link here. Though the link is for Multidimensional model, the concept is same for Tabular model.
While creating standard actions, we can provide expression that define the action i.e. MDX expression that returns a string to be returned by the “Action” to the client application for execution.
The video has a very simple examples which can be further enhanced with more powerful conditions and MDX.