Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi There,
I want dax measure to return the names of the country which have the highest value. The value here is a measure itself.
I have used here a trick of using a line chart and filtering on top n as 1, but this give only 1 country as max, if i have more than 1 countries- how can i get that?
Thanks!
Solved! Go to Solution.
Hi @Anonymous
You can try
Max Country =
VAR T1 =
ADDCOLUMNS ( VALUES ( TableName[Country] ), "@Value", [Measure] )
VAR MaxValue =
MAXX ( T1, [@Value] )
VAR MaxRecord =
FILTER ( T1, [@value] = MaxValue )
RETURN
MAXX ( T1, [Country] )
Hi @Anonymous
You can try
Max Country =
VAR T1 =
ADDCOLUMNS ( VALUES ( TableName[Country] ), "@Value", [Measure] )
VAR MaxValue =
MAXX ( T1, [@Value] )
VAR MaxRecord =
FILTER ( T1, [@value] = MaxValue )
RETURN
MAXX ( T1, [Country] )
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
6 | |
4 | |
3 |