Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a column of country codes that can occurs many times (us, ca, us, us, au, etc). I have another column with 2 words of text describing things about the country (nice + sunny, cold + rainy, etc):
1, us, warm + sunny
2, ca, cold + icy
...
In another table (related by id) I have a measure that calculates the growth (current month count - prev month count) based on the submitted date:
1, 2nd Jan 2016
2, 4th Dec 2016
...
If I do a chart with:
Axis: CountryCode
Value: Growth
Then Order by growth desc, then select the top value ('ca', 120%), I can have a word cloud that shows the top word combination that people used to describe 'ca'. If I limit the word cloud to a single result, it shows the most common combination, 'cold + snowy'.
I want to do the same, but using DAX. How to I extract this value 'cold + snowy' without having the user have to actually click the top value in the chart? I.e I want to show in the middle of the report, the most common words used in the fastest growing country.
Thanks!
Solved! Go to Solution.
Hi @tim_g,
According to your description, you should be able to use TOPN Function (DAX) and SUMMARIZE Function (DAX) to create a measure to get the top value in this scenario. The sample below is for your reference.
I assume you have the two tables like below.
Table1
Table2
1. Use the formula below to create a calculate table to get the "Id" with top Growth.
TopTable =
TOPN (
1,
SUMMARIZE ( Table2, Table2[Id], "TotalGrowth", SUM ( Table2[Growth] ) ),
[TotalGrowth]
)
2. Then you should be able to use the formula below to create a measure to get the top value and show it within a Card visual on the report.
TopValue =
CALCULATE (
FIRSTNONBLANK ( Table1[Description], 1 ),
FILTER ( Table1, Table1[Id] = MAX ( 'TopTable'[Id] ) )
)
Here is the sample pbix file for your reference.
Regards
Hi @tim_g,
According to your description, you should be able to use TOPN Function (DAX) and SUMMARIZE Function (DAX) to create a measure to get the top value in this scenario. The sample below is for your reference.
I assume you have the two tables like below.
Table1
Table2
1. Use the formula below to create a calculate table to get the "Id" with top Growth.
TopTable =
TOPN (
1,
SUMMARIZE ( Table2, Table2[Id], "TotalGrowth", SUM ( Table2[Growth] ) ),
[TotalGrowth]
)
2. Then you should be able to use the formula below to create a measure to get the top value and show it within a Card visual on the report.
TopValue =
CALCULATE (
FIRSTNONBLANK ( Table1[Description], 1 ),
FILTER ( Table1, Table1[Id] = MAX ( 'TopTable'[Id] ) )
)
Here is the sample pbix file for your reference.
Regards
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.