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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
KL718
Frequent Visitor

Find Latest record

Data looks like below, based on NOs. need output as "latest", "No" with reference Part. Tried below but failed.

 

REV = MAXX(FILTER(Part_Hist,Part_Hist[REV_NUM]>EARLIER(Part_Hist[REV_NUM])),IF(Part_Hist[Part Name]=EARLIER(Part_Hist[Part Name]),"Yes","No"))

 

REV = MAXX(FILTER(Table1,Table1[Nos]>EARLIER(Table1[Nos])),IF(Table1[Part]=EARLIER(Table1[Part]),"OLD","Latest"))

 

Latest.PNG

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@KL718 Please try this as a New Column

 

Remarks = 
VAR _Max = CALCULATE(MAX(Test260FlagLatest[Nos]),ALLEXCEPT(Test260FlagLatest,Test260FlagLatest[Part]))
RETURN IF(Test260FlagLatest[Nos]=_Max,"Latest","No")

image.png





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

Proud to be a PBI Community Champion




View solution in original post

2 REPLIES 2
PattemManohar
Community Champion
Community Champion

@KL718 Please try this as a New Column

 

Remarks = 
VAR _Max = CALCULATE(MAX(Test260FlagLatest[Nos]),ALLEXCEPT(Test260FlagLatest,Test260FlagLatest[Part]))
RETURN IF(Test260FlagLatest[Nos]=_Max,"Latest","No")

image.png





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

Proud to be a PBI Community Champion




Thanks & appreciate. 

 

I was also able to find the solution. Sharing another way which can be used to achieve the output.

 

I wrote DAX>> 

max = CALCULATE(MAX(Table1[Nos]),FILTER(Table1,Table1[Part]=EARLIER(Table1[Part])))
 
Then,
 
REV1 = IF(Table1[Nos]>=Table1[max],"Latest","Old")
 
Gives same result.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.