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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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