Forum Discussion
austinb97
5 years agoRegular 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
- ryan_mayuSuper User
could you pls provide some sample data and expected output?
- AnonymousNot 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.
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.