Power Pivot - Dividing two columns

%3CLINGO-SUB%20id%3D%22lingo-sub-1709782%22%20slang%3D%22en-US%22%3EPower%20Pivot%20-%20Dividing%20two%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1709782%22%20slang%3D%22en-US%22%3E%3CP%3EHey%2C%20I%20have%20two%20columns%20(dollar%20discount%2C%20active%20customers)%20in%20a%20connection%20in%20power%20pivot%20in%20excel.%20I%20want%20to%20divide%20them%20by%20each%20other.%20In%20power%20pivot%20the%20calculation%20looks%20like%20it%20works%20correctly%20for%20every%20row.%20When%20creating%20a%20pivot%20table%20from%20that%20in%20excel%20it%20doesn't%20aggregate%20the%20calculation%20properly.%20I%20tried%20either%20the%20iferror(a%2Fb%2C0)%20and%20also%20%3Ddivide(a%2Cb)%20But%20to%20no%20avail.%20What%20am%20I%20missing%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1709782%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1710423%22%20slang%3D%22en-US%22%3ERe%3A%20Power%20Pivot%20-%20Dividing%20two%20columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1710423%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F807939%22%20target%3D%22_blank%22%3E%40chriswein%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20exactly%20is%20wrong%2C%20could%20you%20please%20provide%20bit%20more%20details%3F%20And%20what%20do%20you%20aggregate%20-%20calculation%20column%20or%20measure%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hey, I have two columns (dollar discount, active customers) in a connection in power pivot in excel. I want to divide them by each other. In power pivot the calculation looks like it works correctly for every row. When creating a pivot table from that in excel it doesn't aggregate the calculation properly. I tried either the iferror(a/b,0) and also =divide(a,b) But to no avail. What am I missing?

2 Replies
Highlighted

@chriswein 

What exactly is wrong, could you please provide bit more details? And what do you aggregate - calculated column or measure?

Highlighted

@Sergei Baklan I think I just found a solution. I had to create it outside of powerpivot, just in the regular excel UI. powerpivot tab and then create a new measure. That way the aggregation worked correctly!