cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AGL Visitor
Visitor

Which row has the MAXX value?

I am finding the maximum value for sets of filtered rows in a column from the first table.

The following DAX statement gives  the appropriate maximum value which goes into the second table.

 

 

F Max (ID) =

var d = 'F PL'[RT]

Return

        CALCULATE(maxx('F Sub',[F9]),FILTER('F Sub',[RT]=d))

 

 

 Table = F Sub                                                                   

ID

F9

RT

1

12

1

2

5

1

3

87

1

4

64

2

5

35

2

6

22

3

7

43

3

 

 

Table = F PL

RT

F Max (ID)

ID (F Max)

1

87

3

2

64

4

3

43

7

 

 

 

Column 'ID (F Max)' is the ID from table 'F Sub' associated with the maximum value.

 

I do not know how to get the values for column 'ID (F Max)'.

 

Any help would be appreciated.

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yulgu-msft Super Contributor
Super Contributor

Re: Which row has the MAXX value?

Hi @AGL,

 

ID (F Max) =
LOOKUPVALUE (
    'F Sub'[ID],
    'F Sub'[RT], 'F PL'[RT],
    'F Sub'[F9], 'F PL'[F Max (ID)]
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
v-yulgu-msft Super Contributor
Super Contributor

Re: Which row has the MAXX value?

Hi @AGL,

 

ID (F Max) =
LOOKUPVALUE (
    'F Sub'[ID],
    'F Sub'[RT], 'F PL'[RT],
    'F Sub'[F9], 'F PL'[F Max (ID)]
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 244 members 2,702 guests
Please welcome our newest community members: