We have seen how to configure dynamic measure selection using DAX measures in Power BI desktop:
Article: Dynamic Measure Selection
This article explains how to replicate this in Power Pivot. All the steps mentioned in the previous article are applicable here. Let us quickly walk through the steps:
Download Sample File
Step 1: Creating a Support Table containing DAX Measures List
Tip: Assign appropriate table name
Add the table to the data model:
Step 2: Add DAX measures using SWITCH
Default Measure Selection = MIN(MeasureTable[Index]) Measure Switch =SWITCH( [Default Measure Selection], 1,[Orders by Ship Date], 2,[Returned Orders], 3,FORMAT([Returned Sales Amt],"0,0.0"), 4,FORMAT([Sales Amount],"0,0.0"), 5,[Total Orders] )
Step 3: Add a Slicer in the Pivot Table for Measure Name
Add a slicer with the Measure Name column.
Ensure one item is selected in slicer before we add the DAX measure in the Pivot.
Step 4: Add the DAX measure in the Pivot
And that is it!