Forum Discussion
Anonymous
6 years agoNot applicable
Calculate Difference Between Global Average
Hello, I am trying to calculate a difference between a customer's proportion of sales in product groups vs the global average proportion for that customer's product group. For example I have...
- 6 years ago
Hi Anonymous
Refer to the following DAX:
Selected Customer = CALCULATE ( COUNT ( 'Table'[Customer ID] ), ALLSELECTED ( 'Table'[Customer ID] ) ) / COUNTROWS ( ALLSELECTED ( 'Table' ) )Global = CALCULATE ( SUM ( 'Table'[Line Sales] ), ALLEXCEPT ( 'Table', 'Table'[Product Group], 'Table'[Customer Group] ) ) / CALCULATE ( SUM ( 'Table'[Line Sales] ), ALLEXCEPT ( 'Table', 'Table'[Customer Group] ) )
amitchandak
6 years agoSuper User
Anonymous
You can create a category Average and use
https://community.powerbi.com/t5/Desktop/Calculate-Average-per-category/td-p/362637
You have an option in Quick measure too