Forum Discussion
ADSL
Post Prodigy
4 years agoCalculate the Contribution % by Province
Hi BI Community Team, I want to calculate the contribution % by province of total sales as the table below. ==> Formula = Grand Total Sales / Total Sales by Province Any suggestion of...
- 4 years ago
How about
Contribution2 % =var _total =CALCULATE(SUM('Order'[Amt No VAT]),ALLEXCEPT('Order','Order'[Province]))ReturnDIVIDE(SUM('Order'[Amt No VAT]), _total,0) - 4 years ago
Are you looking for this
Contribution3 % =Var _Total_By_Client =CALCULATE(SUM('Order'[Amt No VAT]),ALL('Order'[Province]))Var _clientTotal =SUM('Order'[Amt No VAT])ReturnDIVIDE(_clientTotal,_Total_By_Client,0) - 4 years ago
Hi,
To your Table visual, drag Province and Client Name. Write these measures
Sales = sum(Data[Total Actual Sales])
Total sales = calculate([Sales],all(Data[Province]))
Contribution (%) = divide([Sales],[Total sales])
Hope this helps.
ADSL
Post Prodigy
4 years agoHi Ashish_Mathur,
Please kindly help to check the screenshot below that doing the total sales by client vs. total sales by province & client.
Thanks and Regards,
Ashish_Mathur
Super User
4 years agoHi,
To your Table visual, drag Province and Client Name. Write these measures
Sales = sum(Data[Total Actual Sales])
Total sales = calculate([Sales],all(Data[Province]))
Contribution (%) = divide([Sales],[Total sales])
Hope this helps.