Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! 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
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 62 | |
| 42 | |
| 21 | |
| 18 |