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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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