The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I'm trying to calculate the TopN contribution % based on Customer, Branch or Type.
Customer | Branch | Type | Actual | Budget |
A | NY | Red | $50 | $120 |
B | CA | Green | $250 | $300 |
C | IL | Blue | $40 | $150 |
A | NY | Blue | $80 | |
C | IL | Red | $60 |
I was able to calculate the Top 2 Customers using :
But when I try to calculate the contribution % using :
Solved! Go to Solution.
Hi @TB2 ,
Thank you @Jihwan_Kim very much for the solution, and I've tried other ways to help you understand the problem:
For your question, I think your last step could include an all condition to remove the context filtering.
TOP 2 Contribution % = DIVIDE('Table'[Top 2 Customers],CALCULATE('Table'[sales revenge],ALL('Table')))
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @TB2 ,
Thank you @Jihwan_Kim very much for the solution, and I've tried other ways to help you understand the problem:
For your question, I think your last step could include an all condition to remove the context filtering.
TOP 2 Contribution % = DIVIDE('Table'[Top 2 Customers],CALCULATE('Table'[sales revenge],ALL('Table')))
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I am not sure if I understood your question correctly, but please try something like below whether it suits your inquiry.
Top 2 Contribution % =
DIVIDE (
[Top 2 Customers],
CALCULATE ( [Sales Revenue], ALLSELECTED ( 'Customers'[Customer #] ) )
)
Hello @TB2 , and thank you for sharing your question with the Community. Please remember to adhere to the decorum of the Community Forum when asking a question.
Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive, Dropbox, or to a Github repository, and then share the file’s URL.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.