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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Deepikasubu
Frequent Visitor

Max of amount on a specific column

Hi,
Below is the data i have:
Table 1:

CodeRV
2017-0014540.3
2017-1140130.85
2017-0014222.3
2017-111012.75
2017-1036F2.74
2017-170002.5
2017-120312.45
2017-111001.27
2017-001401.25
2017-114021.22
2017-170031.22
2017-110420.6

 

Table 2:

LOBNameCode
MEDMAC2017-00140
MEDMAC2017-00142
MEDMAC2017-00145
MEDSWD2017-1036F
Not SpecifiedSWD2017-1036F
COMMRJ2017-11042
COMRTD2017-11100
COMRTD2017-11101
MEDRTD2017-11101
COMRTD2017-11401
MEDRTD2017-11401
COMRTD2017-11402
MEDRTD2017-11402
COMRTD2017-12031
MEDRTD2017-12031
COMRTD2017-17000
MEDRTD2017-17000
MEDRTD2017-17003

 

Table 1 and Table 2 is joined by code with  1 to M relationship having cross filter direction enabled (BOTH).

 

Expected Result:

NameRVMeasure
MRJ0.6 
MAC63.85 
RTD42.2663.85
SWD2.74 

 

In the "Measure" above i need max of the "RV" displayed only for Name="RTD".
can anyone help? i tried so many ways, but ended up with 42.26 itself...

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Measure = 
VAR myTable = SUMMARIZE(ALL(Table2),Table2[Name],"RV",CALCULATE(SUM(Table1[RV])))
VAR theMax = MAXX(myTable,[RV])
RETURN IF(MAX([Name])="RTD",theMax,BLANK())


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Measure = 
VAR myTable = SUMMARIZE(ALL(Table2),Table2[Name],"RV",CALCULATE(SUM(Table1[RV])))
VAR theMax = MAXX(myTable,[RV])
RETURN IF(MAX([Name])="RTD",theMax,BLANK())


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks it was really helpful

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.