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 September 15. Request your voucher.

Reply
Mk60
Resolver I
Resolver I

New measure to capture only Total value from the customized Top10 table visual

I need to create new measure that will capture only a single number, which is my Top10 total Balance in my customized table visual, (yellow cell in the attached picture). My only data table is called "Query1", and has thousands of clients, several dozens of product Types and a handfull of Regions, and much more. Each client can have several different product Types with individual balances for each type, so clients would show multiple times even with Top10 filter based on balance. In order to filter only Top10 clients, AND only show a sigle Type for each client, (one Type with largest balance only), but still total all balances for each unique client in the "Balance" column.

To acomplish my Top10 list showing only one Type for each client BUT combine all multiple Types balances for each client, I used this dax calculation, which worked great:  MaxType = MAXX ( TOPN ( 1, Query1, Query1[Balance] ), Query1[TYPE] )

Now, if you could kindley direct me to the right solution to create new measure that will capture only one number, which is my "Top10-Total" Balance of 55,000,000, I would greatly appreciate your help!

 

Sample of my Top10 table with column names used:

Mk60_0-1719010067995.png

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Mk60 

 

Try this:

Top10TotalBalance = 
VAR TopClients = 
    TOPN(
        10,
        SUMMARIZE(
            Query1,
            Query1[Client],
            "TotalBalance", SUM(Query1[Balance])
        ),
        [TotalBalance], DESC
    )
VAR TopClientsTable = 
    FILTER(
        Query1,
        Query1[Client] IN SELECTCOLUMNS(TopClients, "Client", [Client]) &&
        Query1[Type] = [MaxType]
    )
RETURN
SUMX(TopClientsTable, Query1[Balance])

 

 

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

Appreciate your Kudos!! 

 

LinkedIn|Twitter|Blog |YouTube 

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hi @Mk60 

 

Try this:

Top10TotalBalance = 
VAR TopClients = 
    TOPN(
        10,
        SUMMARIZE(
            Query1,
            Query1[Client],
            "TotalBalance", SUM(Query1[Balance])
        ),
        [TotalBalance], DESC
    )
VAR TopClientsTable = 
    FILTER(
        Query1,
        Query1[Client] IN SELECTCOLUMNS(TopClients, "Client", [Client]) &&
        Query1[Type] = [MaxType]
    )
RETURN
SUMX(TopClientsTable, Query1[Balance])

 

 

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

Appreciate your Kudos!! 

 

LinkedIn|Twitter|Blog |YouTube 

Hi Vahid,

After I applied my existing filters that I used for my original Top10 table, I got correct Total number I wanted using your dax syntax as a new measure. It looks like I cannot drop it in a table with other attributes from my Query1 data table, and I can only use it separately with the card visual? Is that correct statement? Even if so, that will still work for me. I so much apprecite you! Before I accept this as solution, I wanted to ask you this follow up: I tried to use my new measure "Top10TotalBalance" as numerator to calculate % of grand total, and I am not getting what I should for %? My grand total, (denominator) is available in my Query1, and the column name for that is "Criticized", balance, which I want to use as denominator to calculate % of Top10.

Mk60_0-1719018973536.png

I tied using this syntax but not gettting correct %: 

Mk60_1-1719019186424.png

Would you have better dax suggestion to capture Top10 balance as % of all Criticized balance I already have?

Thanks a ton again! 

mk

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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