Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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] )
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 |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |