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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
MattRoed
Helper I
Helper I

Mark if number is highest in group

I want to mark a record if it has the highest iteration in a group. It would look like the last column in this table.

LocationIterationLive
A1NL
A1NL
A2NL
A2NL
A3L
A3L
B1NL
B1NL
B2NL
B2NL
B3L

 

Please let me know if someone has a solution. Thanks!

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @MattRoed ,

 

Create a Calculated Column

 

 

Highest in Group = 

var a = CALCULATE(MAX('Table'[Iteration]), FILTER ('Table','Table'[Location] = EARLIER('Table'[Location])))

RETURN

IF ( 'Table'[Iteration] = a , "L","NL")

 

 

 

1.jpg

 

Incase you want a measure

 

Highest in Group M = 

var a = CALCULATE(MAX('Table'[Iteration]), FILTER (ALL('Table'),'Table'[Location] = MAX('Table'[Location])))

RETURN

IF ( MAX('Table'[Iteration]) = a , "L","NL")

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

View solution in original post

2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @MattRoed ,

 

Create a Calculated Column

 

 

Highest in Group = 

var a = CALCULATE(MAX('Table'[Iteration]), FILTER ('Table','Table'[Location] = EARLIER('Table'[Location])))

RETURN

IF ( 'Table'[Iteration] = a , "L","NL")

 

 

 

1.jpg

 

Incase you want a measure

 

Highest in Group M = 

var a = CALCULATE(MAX('Table'[Iteration]), FILTER (ALL('Table'),'Table'[Location] = MAX('Table'[Location])))

RETURN

IF ( MAX('Table'[Iteration]) = a , "L","NL")

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

Not sure if this is what you are looking for, but you could add a calculated column:

 

Live = IF('Iterations'[Iteration]=MAX([Iteration]), "L", "NL")

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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