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:

[TABLE="width: 500"]
<TBODY>[TR]
[TD]ratingCode[/TD]
[TD]ratingDescription[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]BEST [/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]GOOD[/TD]
[/TR]
</TBODY>[/TABLE]


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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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,223,942
Messages
6,175,544
Members
452,652
Latest member
eduedu

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