Forum Discussion
AnetaK
8 years agoHelper V
ALL not working
Hi, I am working on one table on sales with columns: - table[Customer] - table[Product] - table[Order_date] - table[Sale] and measure: - Sales=SUM(table[sale]) I want to create an avera...
- 8 years ago
Hi AnetaK,
I have made a sample data based on your description like below:
If works well when no customer has been selected in slicer:
To achieve the total value of products when a customer has been selected, you can modify measure [Avg sales] like this:
AvgSales = CALCULATE ( DIVIDE([Sales], DISTINCTCOUNT ( 'Table'[Customer] )), ALLEXCEPT('Table', 'Table'[Customer]))PBIX here: https://www.dropbox.com/s/0plppnuj6qcaikc/For%20AnetaK.pbix?dl=0
Regards,
Jimmy Tao
v-yuta-msft
8 years agoCommunity Support
Hi AnetaK,
I have made a sample data based on your description like below:
If works well when no customer has been selected in slicer:
To achieve the total value of products when a customer has been selected, you can modify measure [Avg sales] like this:
AvgSales = CALCULATE ( DIVIDE([Sales], DISTINCTCOUNT ( 'Table'[Customer] )), ALLEXCEPT('Table', 'Table'[Customer]))
PBIX here: https://www.dropbox.com/s/0plppnuj6qcaikc/For%20AnetaK.pbix?dl=0
Regards,
Jimmy Tao