Forum Discussion
Weighted Distribution DAX formula
Please help me.
I have model with tables:
-Sales (date, prod_id, cust_id, quantity)
-SKU (prod_id, SKU_id, ...)
-and other table with customers dimensions, related through one table with unique cust_id.
How to write formula to count percentage of weighted distribution? For example cust#1 total sales is 30% from overall sales, so selling SKU to this customer is 30% of disctribution.
2 Replies
- Ritaf1983Super User
Hi Anonymous
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - JoeBarrySolution Sage
Hi Anonymous
As mentioned without seeing a sample data it makes answering harder, but lets give it a go.
Create a Sales measure.
Sales = SUM(quantity)To create a comparison to the total, you need to create a measure to create the reult of the total Sales.
Total Sales = SUMX(ALL(Sales), Sales[quantity])You can then create another measure to get the % of total
% of Total = DIVIDE([Sales], [Total Sales])Then change the format to %