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.
I am not completely understanding your desired outcome but here are a couple of measures that might work for you.
Hi jgeddes,
Yes, understand because one sales rep serivce for multiple clients then want to know the contribution by province and client as well.
Please kindly help to check and assist again as the screenshot below.
Any suggestion?
- jgeddes3 years ago
Super User
Contribution2 % =var _total =CALCULATE(SUM([Total Actual Sales]),ALLEXCEPT('table (9)', 'Table (9)'[Client Name]))ReturnDIVIDE(SUM([Total Actual Sales]),_total,0)This should work for you.- ADSL3 years ago
Post Prodigy
Hi jgeddes ,
I am trying your measure suggestion, but it's not working as expectation. Please kindly assist to check the screenshot below.
I think it should be "Total Sales of client and each province" divide by "grand total"
You can check the sample data of my pbix file - https://drive.google.com/file/d/1maX8nwvhc2TIUUVML59cvCUnsPG20PeI/view?usp=sharing
- jgeddes3 years ago
Super User
How about
Contribution2 % =var _total =CALCULATE(SUM('Order'[Amt No VAT]),ALLEXCEPT('Order','Order'[Province]))ReturnDIVIDE(SUM('Order'[Amt No VAT]), _total,0)