Using RELATED with a Measure

jack10063

Board Regular
Joined
Aug 12, 2008
Messages
103
Hi,

This is PowerPivot newbie question so apologize for that. I have defined a measure that returns an integer. However, I'd like it to return a string according to a table below:

ratingCoderatingDescription
1BEST
2GOOD

<TBODY>
</TBODY>


I have created this table in the PowerPivot model. So, currently my measure returns a value 2 (ratingCode) but I'd like it to return the ratingDescription "GOOD".

How should I do this?

br,
Jack
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
There are a few ways to accomplish that. As far as which one is best, really depends on what your measure actually is, the context of the pivot in which it is being used, the slicers you are usings, etc...

However, if you don't have too many rating codes, a simple solution may be to use a SWITCH() that looks at your current measure. Something like this:

New Measure:=SWITCH([YourMeasure], 1, "BEST", 2, "GOOD")
 
Upvote 0
Thanks a lot for your answer. SWITCH seems quite handy indeed if there arent too many codes. I have approximately 20 and thus it would be great to use some kind of a lookup function.

br,
Jack
 
Upvote 0

Forum statistics

Threads
1,203,525
Messages
6,055,915
Members
444,834
Latest member
ComputerExcel

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