0
votes

I am looking for help on creating a measure that is a % of itself or % of the column total. Currently I have to create a duplicate of the aggregate (customers) and then in format values --> Show as % of Column total. I would like to make the measure explicitly that %.

Example:

State | Customers | New Measure GA | 500 | 50% SC | 250 | 25% NY | 250 | 25%

I would want this measure to update based on whatever filter or row column i use in my PowerPivot table.

3

3 Answers

1
votes

Use this expression:

%cust = FORMAT((Sum(Tabla[Customers])/1000),"0%")

It will create a measure called %cust formatted to percent without decimals. If you want to get the decimals just replace "0%" by "0.00%".

enter image description here

Let me know if this helps.

0
votes

This formula worked for me.

Cust%:=Sum(table[cust])/CALCULATE(sum(table[cust]),ALL(table))

Oh and I format the measure as a % since the value comes out as 1

0
votes

Define a sum measure -

[cust_msr]:
=sum(table[cust])

Define the % measure:

[Cust%:]=
divide(
[cust_msr]
,CALCULATE([cust_msr],ALL(table))
,blank())

Using divide is best practice as it means any error values are set to blank values. Of course, you can set them as 0 or -1 etc if you'd like.

Also, set the measure data type in the powerpivot window and you won't need to faff around with format()