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
austinb97
Regular Visitor

first value by date

Hi, 
 
I currently have the below formula which works to give me a max value. However, the issue is if I have a date with two or more identical max values, the formula returns this max value on both rows. I only want to return the first occurance of this max value. How can I modify this formula to only give me the first occurance of the max value?
 
Hourly Price Setter With Duplicates =
VAR MAXVALUE =
CALCULATE(
MAX(MeritOrder[Price]),
ALLEXCEPT(MeritOrder,MeritOrder[Date],MeritOrder[Dispatched])
)
RETURN
IF(
MAXVALUE=MeritOrder[Price] && MeritOrder[Dispatched]="Y",
MAXVALUE,
BLANK()
)
2 REPLIES 2
Anonymous
Not applicable

Hi @austinb97 ,

 

Based on my test, it works well. It's a calculated column. In the two rows of the same date, he only returned the row with the largest value.

5.png

Please provide sample data and expected results.

 

Best Regards,

Stephen Tao

 

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

 

 

ryan_mayu
Super User
Super User

@austinb97 

could you pls provide some sample data and expected output?





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

Proud to be a Super User!




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