Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Card value based on another column

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_CLIENTNAME
1Jack
2Louise
3Frank
COD_CLIENTEARNINGS
2$4,879.03
1$271,88
3$89,764
2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

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

View solution in original post

truptis
Community Champion
Community Champion

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

View solution in original post

2 REPLIES 2
truptis
Community Champion
Community Champion

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

Anonymous
Not applicable

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.