Forum Discussion
Keep filter - TopN Sales Contribution %
Hi every one,
I try Topn Sales with "Sub-Cat" wise contribution %. Here i need to show my percentage values with TopN sales by elimating unwanted data.
Contribution % formula is:
GT% Values = [Total Sales] / (CALCULATE(SUM(Orders[Sales]), ALLSELECTED(Orders[Sub-Category] )))
Output should come like below...
| Sub-Category | TopN SubCat | GT% Values |
| Phones | 1857159.027 | 13.54% |
| Chairs | 1642421.76 | 11.97% |
| Copiers | 1594855.209 | 11.63% |
| Bookcases | 1516835.595 | 11.06% |
| Storage | 1233162.199 | 8.99% |
| Appliances | 1065196.174 | 7.77% |
| Machines | 862912.0331 | 6.29% |
| Tables | 845985.4444 | 6.17% |
How can i achive this....
Thanks in advance...
Hi venug20,
Update your formula as below.
GT% Values = IF(ISBLANK([TopN subcate]),BLANK(), [total sales]/CALCULATE(SUM(Orders[Sales]),ALLSELECTED(Orders[Sub-Category])))
Alsp please find the pbix as attached.
Regards,
Frank
4 Replies
- Greg_DecklerCommunity Champion
Sample source data please. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- v-frfei-msftCommunity Support
Hi venug20,
Update your formula as below.
GT% Values = IF(ISBLANK([TopN subcate]),BLANK(), [total sales]/CALCULATE(SUM(Orders[Sales]),ALLSELECTED(Orders[Sub-Category])))
Alsp please find the pbix as attached.
Regards,
Frank
- venug20Resolver I