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
Hi there,
I want to show in a card the name of the client who earned the most in a date range. I have these two tables which are DirectQueries.
I know it surely is obvious for a lot of you, but I'm still in process of learning the basics.
Is there any way I can do it? Any help or advice would be kindly appreciated!
| COD_CLIENT | NAME |
| 1 | Jack |
| 2 | Louise |
| 3 | Frank |
| COD_CLIENT | EARNINGS |
| 2 | $4,879.03 |
| 1 | $271,88 |
| 3 | $89,764 |
Solved! Go to Solution.
Please Try This measure
_name =
VAR _MAX =
MAX ( 'Table_name(1)'[_CLIENTEARNINGS] )
VAR MAX_NAME =
CALCULATE (
MAX ( 'Table_name'[_CLIENTEname] ),
FILTER ( 'Table_name', 'Table_name(1)'[_CLIENTEARNINGS] = _MAX )
)
RETURN
MAX_NAME
Hi @Anonymous,
Please try this:
Result = var max_earning = max('tablename'[CLIENTEARNINGS])
RETURN
CALCULATE (
MAX ( 'Tablename'[CLIENTNAME] ),
FILTER ( 'Tablename', 'Tablename'[CLIENTEARNINGS] = max_earning )
)
@Anonymous - Please mark it as a solution, if it helps you. Thanks.
Regards,
TruptiS
Hi @Anonymous,
Please try this:
Result = var max_earning = max('tablename'[CLIENTEARNINGS])
RETURN
CALCULATE (
MAX ( 'Tablename'[CLIENTNAME] ),
FILTER ( 'Tablename', 'Tablename'[CLIENTEARNINGS] = max_earning )
)
@Anonymous - Please mark it as a solution, if it helps you. Thanks.
Regards,
TruptiS
Please Try This measure
_name =
VAR _MAX =
MAX ( 'Table_name(1)'[_CLIENTEARNINGS] )
VAR MAX_NAME =
CALCULATE (
MAX ( 'Table_name'[_CLIENTEname] ),
FILTER ( 'Table_name', 'Table_name(1)'[_CLIENTEARNINGS] = _MAX )
)
RETURN
MAX_NAME
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 |
|---|---|
| 84 | |
| 48 | |
| 36 | |
| 31 | |
| 29 |