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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
GoingIncognito
Advocate III
Advocate III

Rankx <= 8 categories OR 80% + Remaining

Hi.

What would be the best practice of designing a rankx-function that gives 1-8 categories or 80% of total value - which ever is valuated true sooner. Also need the remaining as one category. So I need to use topn() also.

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @GoingIncognito ,

 

I guess you can adapt the approach described by the guys from sqlbi.com in this article: https://www.sqlbi.com/articles/showing-the-top-5-products-and-others-row/ to achieve what you want.

 

If you need more ideas, provide a pbix that contains sample data and represents your data model. Upload the pbix to onedrive or dropbox and share the link. If you use Excel to create the sample data, upload the xlsx file(s) as well.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User
TomMartens
Super User
Super User

Hey @GoingIncognito ,

 

I guess you can adapt the approach described by the guys from sqlbi.com in this article: https://www.sqlbi.com/articles/showing-the-top-5-products-and-others-row/ to achieve what you want.

 

If you need more ideas, provide a pbix that contains sample data and represents your data model. Upload the pbix to onedrive or dropbox and share the link. If you use Excel to create the sample data, upload the xlsx file(s) as well.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.