SWITCH DAX measures in Power Pivot



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!




@imVivRan

Drop Me a Line, Let Me Know What You Think

 

contact@vivran.in

+91 9871-641-146

Join WhatsApp group: BI Simplified

MS EXCEL || POWER BI || POWER APPS || POWER QUERY || TABLEAU || DATA ANALYTICS || TRAINING