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
Anonymous
Not applicable

TopN As % Of GT

Hi

 

I have columns: Customer Name and Final BDR. What I want to achieve is to have three cards:

1) Sum Of Final BDR | Easy, Done

2) Sum Of Final BDR Filtered With Top 20 Customers With Highest Final BDR | Easy, Done*

3) Second Card As Percentage Of First**

 

*I have created a card and added Top20 By Final BDR in the "Filters On This Visual" part of filters pane.

** Example: If 1) Is 200k and 2) 100k then 3) would be 50%

 

Does anyone know how to achieve this?

 

thank you
Marek

1 ACCEPTED SOLUTION
lkalawski
Memorable Member
Memorable Member

Hi @Anonymous

For 1. you probably have a measure created.
For 2. you should create a measure that uses the TOPN function for 20 values sorted against Final BDR.
For 3. you should use DIVIDE (1., 2., 0) and convert the format to percentages.



_______________
If I helped, please accept the solution and give kudos! 😀

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

If you share some dummy data and expected results then we can coding formula and provide some sample formulas based on these records.

How to Get Your Question Answered Quickly 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
lkalawski
Memorable Member
Memorable Member

Hi @Anonymous

For 1. you probably have a measure created.
For 2. you should create a measure that uses the TOPN function for 20 values sorted against Final BDR.
For 3. you should use DIVIDE (1., 2., 0) and convert the format to percentages.



_______________
If I helped, please accept the solution and give kudos! 😀

amitchandak
Super User
Super User

@Anonymous , there a few ways TOPN WAY

(top 2- top1 )/top1

Divide( CALCULATE([Sales],TOPN(2,all(Geography[City]),[Sales],DESC),VALUES(Geography[City Id]))

            - CALCULATE([Sales],TOPN(1,all(Geography[City]),[Sales],DESC),VALUES(Geography[City Id])) ,

          CALCULATE([Sales],TOPN(1,all(Geography[City]),[Sales],DESC),VALUES(Geography[City Id])))

 

 

 

Rank way

City Rank = RANKX(all(Geography[City]),[Sales])

divide(sumx(filter(VALUES(Geography[City]),[City Rank]=2),[Sales] ),sumx(filter(VALUES(Geography[City]),[City Rank]=1),[Sales] ))

 

 

 

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.