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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Syndicate_Admin
Administrator
Administrator

Column calculated to bring the maximum value if there are duplicate values

I have the following table that has duplicate shipment values, I need that every time I find duplicate shipment values I choose the highest Max Division value.

KarenSF_1-1714414167395.png

In this case, the column calculated for the 2 rows shows the value of 3.34239

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Syndicate_Admin 

Data provided based on your description and pictures:

vjianpengmsft_0-1714440539663.png

I use the following calculated column DAX expression:

Column =
CALCULATE (
    MAX ( 'Sheet1'[MAX Division] ),
    FILTER ( 'Sheet1', 'Sheet1'[Shipment_Id] = EARLIER ( Sheet1[Shipment_Id] ) )
)

Here are the results:

vjianpengmsft_1-1714440651557.png

I have provided the PBIX file used this time below.

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Thank you very much, it worked out perfectly!.

Anonymous
Not applicable

Hi, @Syndicate_Admin 

Data provided based on your description and pictures:

vjianpengmsft_0-1714440539663.png

I use the following calculated column DAX expression:

Column =
CALCULATE (
    MAX ( 'Sheet1'[MAX Division] ),
    FILTER ( 'Sheet1', 'Sheet1'[Shipment_Id] = EARLIER ( Sheet1[Shipment_Id] ) )
)

Here are the results:

vjianpengmsft_1-1714440651557.png

I have provided the PBIX file used this time below.

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors