Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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:
Solved! Go to Solution.
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!!
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!!
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.
I tied using this syntax but not gettting correct %:
Would you have better dax suggestion to capture Top10 balance as % of all Criticized balance I already have?
Thanks a ton again!
mk
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
59 | |
53 | |
52 | |
36 | |
33 |
User | Count |
---|---|
80 | |
73 | |
45 | |
45 | |
43 |