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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
vincenardo
Helper I
Helper I

Find Max Value in Table based on value in another column

I want to find the max value for each name.

 

Here is a sample of my data;

2022-12-23_8-20-04.png

I added tried using this formula in a calculated column (MAX LEVEL) -

MAX LEVEL = MAXX(FILTER('HC-1 INSTALL PBI Service Resources with Skill','HC-1 INSTALL PBI Service Resources with Skill'[Name]='HC-1 INSTALL PBI Service Resources with Skill'[Name]),'HC-1 INSTALL PBI Service Resources with Skill'[Installer Skill Name Lvl])

But that formula is finding the max value for ALL the rows and I want to filter based on the NAME.
For Example, for Ahmad Mohammadi above, the max value should be 3.
 
Thanks in advance!

 

 

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @vincenardo 

MAX LEVEL =
MAXX (
    FILTER (
        'HC-1 INSTALL PBI Service Resources with Skill',
        'HC-1 INSTALL PBI Service Resources with Skill'[Name]
            = EARLIER ( 'HC-1 INSTALL PBI Service Resources with Skill'[Name] )
    ),
    'HC-1 INSTALL PBI Service Resources with Skill'[Installer Skill Name Lvl]
)

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

@vincenardo 

or alternatively, leveraging context transition:

MAX LEVEL =
CALCULATE (
    MAX ( 'HC-1 INSTALL PBI Service Resources with Skill'[Installer Skill Name Lvl] ),
    ALLEXCEPT (
        'HC-1 INSTALL PBI Service Resources with Skill',
        'HC-1 INSTALL PBI Service Resources with Skill'[Name]
    )
)

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

AlB
Super User
Super User

Hi @vincenardo 

MAX LEVEL =
MAXX (
    FILTER (
        'HC-1 INSTALL PBI Service Resources with Skill',
        'HC-1 INSTALL PBI Service Resources with Skill'[Name]
            = EARLIER ( 'HC-1 INSTALL PBI Service Resources with Skill'[Name] )
    ),
    'HC-1 INSTALL PBI Service Resources with Skill'[Installer Skill Name Lvl]
)

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.