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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Super User
Super User

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


@ 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!:
The Definitive Guide to Power Query (M)

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.