Forum Discussion
Anonymous
9 years agoNot applicable
Gross Margin Column For Customer without Creating New Table
Hello, I am looking to create a column that has the total gross margin for the customer on each row. This is transactional data, so the customers are not unique in the columns. How I would typica...
- 9 years ago
Anonymous
Here's the COLUMN formula that should do it
GM % COLUMN = DIVIDE ( CALCULATE ( SUM ( 'Table'[Sales] ), ALLEXCEPT ( 'Table', 'Table'[Customer] ) ) - CALCULATE ( SUM ( 'Table'[Cost] ), ALLEXCEPT ( 'Table', 'Table'[Customer] ) ), CALCULATE ( SUM ( 'Table'[Sales] ), ALLEXCEPT ( 'Table', 'Table'[Customer] ) ), 0 )Hope this helps! :smileyhappy:
Sean
9 years agoCommunity Champion
Anonymous
Here's the COLUMN formula that should do it
GM % COLUMN =
DIVIDE (
CALCULATE ( SUM ( 'Table'[Sales] ), ALLEXCEPT ( 'Table', 'Table'[Customer] ) )
- CALCULATE ( SUM ( 'Table'[Cost] ), ALLEXCEPT ( 'Table', 'Table'[Customer] ) ),
CALCULATE ( SUM ( 'Table'[Sales] ), ALLEXCEPT ( 'Table', 'Table'[Customer] ) ),
0
)Hope this helps! :smileyhappy:
Anonymous
9 years agoNot applicable
Just what I wanted. Thanks!