Step:1

Create parameter [Measure Parameter] list as sales, profit and Unit Price

 

measure para.png

 

Step:2

Create parameter [Agg Measure Parameter] list as Sum and Avg

 

agg measure.png

 

Step:3

Create calculation as follows [Measure Agg Calc]


IF [Measure Parameter] ="Sales" and [Agg Measure Parameter] ="SUM" then SUM([Sales])

ELSEIF [Measure Parameter] ="Profit" and [Agg Measure Parameter] ="SUM" then SUM([Profit])

ELSEIF [Measure Parameter] ="Unit Price" and [Agg Measure Parameter] ="SUM" then SUM([Unit Price])

ELSEIF  [Measure Parameter] ="Sales" and  [Agg Measure Parameter] =”Avg” then AVG([Sales])

ELSEIF [Display Selection] ="Profit" and [Agg Measure Parameter] ="Avg" then AVG([Profit])

ELSEIF [Measure Parameter] ="Unit Price" and [Agg Measure Parameter] ="Avg" then AVG([Unit Price])

END


Step:4

Drag this [Measure Agg Calc] into column and drag any of dimensions into row


Step:5

Show Parameter control and select Kpis.