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! Learn more
Since my table returned is not base table and it is produced using this code
VAR Y = ADDCOLUMNS ( X, "@RANK", RANKX ( X, [@COUNT],,, DENSE ) )
VAR Z = FILTER (Y, [@RANK] = 1)Z table looks like this
| Country | @Anonymous | @RANK |
| Australia | 2677 | 1 |
How do I get the value "Australia"?
Solved! Go to Solution.
Hi @stribor45,
Sorry about that. I had made a typo, where I had put two brackets instead of one.
Try this:
FIRSTNONBLANK(SELECTCOLUMNS(FILTER (Y, [@RANK] = 1),"Country",Y[Country]),[Country])
This code works for me in DAX Studio but when I move it over to my report data doesnt change when I move slicer
DEFINE
VAR SummaryTable =
SUMMARIZE(
FILTER('AGENTS TABLE', 'AGENTS TABLE'[Country] <> "Canada"),
'AGENTS TABLE'[Country],
"TotalCount", COUNT('AGENTS TABLE'[Call ID])
)
VAR RankedTable =
ADDCOLUMNS(
SummaryTable,
"Rank",
RANKX(SummaryTable, [TotalCount], , DESC)
)
EVALUATE
RankedTable
Hi @stribor45 ,
Can you try like this:
VAR Z = FIRSTNONBLANK(SELECTCOLUMNS(FILTER (Y, [@RANK] = 1),"Country",Y[Country])),[Country])
that didnt work for me. The syntax for '.' is incorrect
Hi @stribor45,
The formula I gave can be used for a measure, but in terms of EVALUATE it expects a table as a input.
Can you try the same inside a measure, preferably in Power BI desktop?
Yes thats why I typed "Evaluate X" instead of Z. I had same error in PBI measure as well
Hi @stribor45,
Sorry about that. I had made a typo, where I had put two brackets instead of one.
Try this:
FIRSTNONBLANK(SELECTCOLUMNS(FILTER (Y, [@RANK] = 1),"Country",Y[Country]),[Country])
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.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |