cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AGL
Regular 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
Highlighted
Microsoft
Microsoft

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.

View solution in original post

1 REPLY 1
Highlighted
Microsoft
Microsoft

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.

View solution in original post

Helpful resources

Announcements
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors