Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
venug20
Resolver I
Resolver I

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-CategoryTopN SubCatGT% Values
Phones1857159.02713.54%
Chairs1642421.7611.97%
Copiers1594855.20911.63%
Bookcases1516835.59511.06%
Storage1233162.1998.99%
Appliances1065196.1747.77%
Machines862912.03316.29%
Tables845985.44446.17%

 

How can i achive this....

 

TopN-Sales-Filter.jpg

 

Thanks in advance...

 

 

 

 

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community 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])))

Capture.PNG

 

Alsp please find the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community 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])))

Capture.PNG

 

Alsp please find the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

@v-frfei-msft

 

Perfectly working, what have i expected.... Thank You...

Greg_Deckler
Community Champion
Community 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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler

 

My sample Data is

 

Snapshot is my actual output....

 

Tabular formate data is my expected output...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.