PowerPivot conditional formatting based on DAX slicer selection

joeshu26

Board Regular
Joined
Oct 30, 2013
Messages
136
Hello,

I have a "Measure" slicer that allows you to select either Nominal, YoY Growth %, or 5yr CAGR %. I then have a DAX measure that calculates based on what is selected in the "Measure" slicer:

Measure Type = IF([isReportSlicerSet],SWITCH(VALUES('Measure'[Measure]),"Nominal",[Total Revenue],"YoY Growth %",[YoY Revenue],"5yr CAGR %",[Revenue 5yr CAGR]))

What I need is for the out put for the formatting to be a decimal formatting for the "Nominal",[Total Revenue] selection and I need the output measure to be in percentage formatting for the YoY or 5yr CAGR selections.

Any ideas??
Thanks!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
You can bring the selection of your slicer into a cell in your workbook which can then be referenced by the conditional formatting:

=CUBERANKEDMEMBER("ThisWorkbookDataModel";MeasureSlicer;1)

hth, Imke
 
Upvote 0
Thanks Imke,

This is the formula I have now : =CUBERANKEDMEMBER("PowerPivot Data","[Measure]",1)

But it is returning "All", instead of "Nominal" or "YoY' when selected...

Any ideas on how to have it show up as just "Nominal" or just "YoY' when they are selected?
 
Upvote 0
Yes, the 2nd element of this formular has to be the name of your slicer, not your measure. No "" and no [], just the plain text.
 
Upvote 0

Forum statistics

Threads
1,216,759
Messages
6,132,550
Members
449,735
Latest member
Gary_M

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top