Symptom
In Power BI, parameterized measures are typically created using local tables and measures, as illustrated below:
Attempting to implement the above design using AtScale isn't obvious (even in tabular mode).
Procedure
Follow these steps to convert parameterized measures from Power BI to an AtScale cube. The approach uses AtScale QDS with Calculated Measures.
Step 1. Create a new dataset in the AtScale cube for Metric selection using SQL
select "Sales Amount" AS Metric UNION ALL select "Quantity Sold" AS Metric UNION ALL select "Order Count" AS Metric
Step 2. Include the newly created dataset as a fact table and create a degenerate dimension for "Metric".
Step 3. Create a Calculated Measure called "SelectedMetric" using the formula below.
CASE WHEN [Metric].[Metric Hierarchy].CurrentMember.MEMBER_NAME = "Sales Amount" THEN [Measures].[Internet Sales Amount Local] WHEN [Metric].[Metric Hierarchy].CurrentMember.MEMBER_NAME = "Quantity Sold" THEN [Measures].[Order Quantity Long] WHEN [Metric].[Metric Hierarchy].CurrentMember.MEMBER_NAME = "Order Count" THEN [Measures].[Internet Order Count] ELSE [Measures].[Internet Sales Amount Local] END
Step 4. Make sure to update the "UNRELATED DIMENSIONS HANDLING" property for the Participating Measures as "Include Repeated Values In Query Results". In this case, do it for the Measures [Measures].[Internet Sales Amount Local],[Measures].[Order Quantity Long],[Measures].[Internet Order Count]
Step 5. Publish the project.
Step 6. In Power BI, create a simple report using the above created measure "SelectedMetric" and make sure to include [Metric].[Metric Hierarchy].[Metric] either in the report or in the filter.
Result
When you select a metric name, now you will see the values change in the report. See example below.