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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Highest value of duplicate

Hi,

 

i have 3 columns column 1 is unique, column 3 and 4 can have duplicates.

 

Now i need to add a column to identify which has the highest value in column 1 when its a duplicate.

 

Example:

IndexIdName
1A21red
2A21red
3A22green
4A23yellow
5A22green
6A24blue
7A21red
8A22green
9A24blue

 

I need to have the higehst value marked with yes in a caalculated column 4

 

IndexIdNameHighest value
1A21redNo
2A21redNo
3A22greenNo
4A23yellowYes
5A22greenNo
6A24blueNo
7A21redYes
8A22greenYes
9A24blueYes

 

Any idea to solve it? Any help is welcome 🙂

 

Regards

3 REPLIES 3
je_s
New Member

My "index" column is not unique (it's actually a duration column counting stop time) - Is there a way to return one of the vaules? 

example: Wrong

je_s_0-1662116128542.png

 

Example: Correct

je_s_1-1662116161750.png

 

 

 

Nathaniel_C
Community Champion
Community Champion

Hi @je_s ,

You will need some data that will differentiate which value to return if the values match - like the two values of 600.  You can either insert an index column, or I notice that your column has the word time in the header.  You could make a rule of taking the first or the last row based on the date by using the time value.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





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

Proud to be a Super User!




Nathaniel_C
Community Champion
Community Champion

 

Hi @Anonymous ,

Try this:

Highest value = 

var _curName = mycolor[Name]
var _curIndex = mycolor[Index]
var _calc = CALCULATE(MAX(mycolor[Index]),FILTER(ALLEXCEPT(mycolor,mycolor[Name]), mycolor[Name]=_curName))

return IF(_calc = _curIndex, "Yes", "No")

 

mycolor.PNG


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 





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

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.