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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Mk60
Resolver I
Resolver I

How can I use Total Balance from Top10 table as a numerator in order to calculate % of All?

I have a dynamic Table visual using Top N filter, which is acomplished by using this dax calculation: 

Top Type = IF ( ISINSCOPE ( Query1[CLIENT] ), MAXX ( TOPN ( 1, Query1, Query1[BALANCE] ), Query1[SEGMENT] ) )

What I need to do it to somehow use the Top10 Total balance as numerator, (yellow cell 73,147,638.59), and divide it by the existing attribute I already have in my table "Query1", (All Region Balance in blue cell 613,751,907.16), so that I can get to my calculation 11.92%? I would assume that Total table balance in yellow cell, which will change every month may need to be defined/captured as separate attribute/measure, so it could be dynamically used? I hope you could kindly direct me to the right solution for this? Thanks much for the help in advance. Hopefully this attachment might be helpful to explain what I am trying to accomplish here:

Mk60_0-1718814486560.png

 

1 ACCEPTED SOLUTION

Hi, Wisdom Wu!

Your 4 steps are exactly what needs to be done here, however your step 2. is the most critical ("2.Create the new measure to filter the top 10 total"), and new neasure in step2 is NOT capturing correct balance for Top10? 

I feel it could be one important fact about filters in my original filtered visual, that I did not communicate well using my attached mock excel table picture above. So please allow me to add some context in order to clarify little more: The Top10 Balance Sum is designed using MAXX in the syntax, bc we need to have only ONE single segment to show for every unique Client, (since clients can have multiple balances under multiple Segments too), and we need to capture only one Segment with highest Balance for each client, but at the same time combine all multiple segment balances for each client in a single row, (aggregated under column Balance). I hope this additional context might be helpful. So, would you kindly take a look in case you perhaps might have inadvertently ommited "MAXX" from my original syntax used to capture Top10 clients? I tried to add "MAXX" to your syntax in your step 2. calc, but could not make it work

Here's my syntax again: 

Mk60_0-1718903721812.png

If we can resolve capturing Top10 combined total, all other steps you suggested should work just fine.

I greatly apprecite your time and wisdom helping with this.

Best Regards,

Mk

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Mk60 ,

Based on my testing, please try the following methods again:

1.Create the simple tables.

vjiewumsft_0-1718848348201.png

2.Create the new measure to filter the top 10 total.

Total 10 balance = 
SUMX(
    TOPN(
        10, 
        ALL('Table'), 
        'Table'[Balance]
    ), 
    'Table'[Balance]
)

vjiewumsft_1-1718848358951.png

3.Create the new measure to calculate the percentage of top 10.

Top 10 percentage of total = 
var _total = SUM('Table'[Balance])
var result = DIVIDE([Total 10 balance], _total)
RETURN
FORMAT(result, "#0.0%")

4.Drag the new measure into the card visual. The result is shown below.

vjiewumsft_3-1718848379336.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, Wisdom Wu!

Your 4 steps are exactly what needs to be done here, however your step 2. is the most critical ("2.Create the new measure to filter the top 10 total"), and new neasure in step2 is NOT capturing correct balance for Top10? 

I feel it could be one important fact about filters in my original filtered visual, that I did not communicate well using my attached mock excel table picture above. So please allow me to add some context in order to clarify little more: The Top10 Balance Sum is designed using MAXX in the syntax, bc we need to have only ONE single segment to show for every unique Client, (since clients can have multiple balances under multiple Segments too), and we need to capture only one Segment with highest Balance for each client, but at the same time combine all multiple segment balances for each client in a single row, (aggregated under column Balance). I hope this additional context might be helpful. So, would you kindly take a look in case you perhaps might have inadvertently ommited "MAXX" from my original syntax used to capture Top10 clients? I tried to add "MAXX" to your syntax in your step 2. calc, but could not make it work

Here's my syntax again: 

Mk60_0-1718903721812.png

If we can resolve capturing Top10 combined total, all other steps you suggested should work just fine.

I greatly apprecite your time and wisdom helping with this.

Best Regards,

Mk

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.