Use the displayed value (Show Values As) in a New Measure

loaizaprat

New Member
Joined
May 12, 2014
Messages
8
I have a PowerPivot table in which one of the columns is displayed as % of Parent Row Total. I want to take that % and use it in a New Measure for the PowerPivot Table.

For instance:

Field 1 Value Field 1 Showed As % Field 2
Row 1 10 25% 100

I want a New Measure that multiples 100 * 0.25 but all I get is 100 * 10.

Any ideas will be appreciated.

Thanks in advance.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I realize the data example is not very clear because of the formatting, so I'll put it again here, hoping it's more clear:

--------"Field 1 Value"---- "Field 1 Showed As %"----- "Field 2"
Row 1______ 10 ______________ 25% ______________100

I want a New Measure that multiples 100 * 0.25 but all I get is 100 * 10.
 
Upvote 0
Nope. The "Show Value As" is kinda of a display only trick that only Excel knows about. PowerPivot has no idea what values are being displayed. You will need to write your measure to "directly" do the work you want.
 
Upvote 0
Nope. The "Show Value As" is kinda of a display only trick that only Excel knows about. PowerPivot has no idea what values are being displayed. You will need to write your measure to "directly" do the work you want.
Thanks for your reply scottsen. Any idea on how to create a measure that calculates the same displayed value I'm talking about?
 
Upvote 0
It's going to depend on your models/measures. You want to sharepoint a workbook and I can take a look?
 
Upvote 0
Wow, I did I really type "sharepoint a workbook". lol. I think most people here post a link to the file on google docs?
 
Upvote 0
Wow, I did I really type "sharepoint a workbook". lol. I think most people here post a link to the file on google docs?
Thanks scottsen, here's a link you can use to access the file: http://1drv.ms/1jdDU99 . What I want to accomplish on the PowerPivot table on Sheet "Points", is a new measure with the following formula:


Table1[Sum of Points] * Table1[Average of Response SLA] * Table1[Average of Restore SLA] * % Tickets Closed
 
Upvote 0
I really wish I could give you an "easy" answer, but alas... it is somewhat complicated.

So, the count of incidents is just: counta(Table1[Incident #])

You would kind of like to do something like... the simple division of THIS incident count to ALL incident count:
=counta(Table1[Incident #]) / CALCULATE(counta(Table1[Incident #]), ALL(Table1))

But that is always calculating the % of TOTAL, not the % of Parent. Unfortunately, you have 2 "levels" of parents... so, you need different calculations for each level, using IF() to decide.

Here is your final version. I think. :)

Code:
=if(HASONEFILTER(Table1[Team - Assignee]), 
       counta(Table1[Incident #]) / CALCULATE(counta(Table1[Incident #]), ALL(Table1[Team - Assignee])),
       counta(Table1[Incident #]) / CALCULATE(counta(Table1[Incident #]), ALL(Table1[Assignment Team]))
)
 
Upvote 0
I really wish I could give you an "easy" answer, but alas... it is somewhat complicated.

So, the count of incidents is just: counta(Table1[Incident #])

You would kind of like to do something like... the simple division of THIS incident count to ALL incident count:
=counta(Table1[Incident #]) / CALCULATE(counta(Table1[Incident #]), ALL(Table1))

But that is always calculating the % of TOTAL, not the % of Parent. Unfortunately, you have 2 "levels" of parents... so, you need different calculations for each level, using IF() to decide.

Here is your final version. I think. :)

Code:
=if(HASONEFILTER(Table1[Team - Assignee]), 
       counta(Table1[Incident #]) / CALCULATE(counta(Table1[Incident #]), ALL(Table1[Team - Assignee])),
       counta(Table1[Incident #]) / CALCULATE(counta(Table1[Incident #]), ALL(Table1[Assignment Team]))
)
Hello Scott.

I only had the chance today to review what you sent. Thank you very much.

I got the following error when Checking the formula: Failed to resolve name 'HASONEFILTER'. It is not a valid table or a function name.

Any ideas?
 
Upvote 0

Forum statistics

Threads
1,223,996
Messages
6,175,853
Members
452,675
Latest member
duongtruc1610

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