Here, we will add a query with parameters.
- Select a Data Source.
- Name this data source. In the Properties pane, click in the Value column for the Name property and type chartQuery. Press Tab or Enter.
- Complete steps 2 and 3 of the Customize the Data Source task.
- Enter the MDX Query. In the Properties pane, locate the Query property and click the ellipsis icon to the right. The MDX Editor window displays.
-
You will add the following query to the chartQuery:
SELECT [Measures].[Sales] ON COLUMNS, [Time].[Months].Members ON ROWS FROM [SteelWheelsSales] WHERE ${productParam}
You can notice the parameter productParam being referred on the WHERE clause (identified with the syntax ${parameterName}). - To add this parameter to the data source, click in the Value column for the Parameters property.
- In the Name column, type productParam. In the Value column, type [Product].[Planes].[Autoart Studio Design].[1900s Vintage Bi-Plane]. Leave the Type column defaulted to String. Click Ok.
- Save your dashboard.