Forum Discussion
Calculate the Contribution % by Province
- 3 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) - 3 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) - 3 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.
Hi,
Please show the expected result very clearly.
Hi 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_Mathur3 years ago
Super User
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.
- Anonymous3 years agoNot applicable
Hi ADSL ,
Here I suggest you to try this measure.
Measure = VAR _Total_By_Client = CALCULATE(SUM('Table'[Total Actial Sales]),ALLEXCEPT('Table','Table'[Client Name])) RETURN DIVIDE(SUM('Table'[Total Actial Sales]),_Total_By_Client)My Sample:
Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ADSL3 years ago
Post Prodigy
Hi Anonymous,
I am trying your measure suggestion, but it seem not working. Please kindly assist to check the screenshot below.
You can go through the sample file pbix - https://drive.google.com/drive/folders/1e8V0wERSSO7ildCMiM8nOYei2b_91n9D?usp=sharing