Forum Discussion
petersoelberg
6 years agoFrequent Visitor
Calculated colum - latest version of document
Hi! I have been searching for a similar case for a couple of days but I am unable to find a relatable solution so I hope one of you will be abe to help me with my enquiry. I have a sales order a...
- 6 years ago
petersoelberg - This is basic use of EARLIER:
Column = VAR __Max = MAXX(FILTER('Table',[Document no] = EARLIER([Document no])),[Version no]) RETURN IF([Version no] = __Max,"Latest","Archived")For more complex versions, See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586
amitchandak
Super User
6 years agopetersoelberg , Refer on of the two. My favorite is LASTNONBLANKVALUE these days
new Column = if(Table1[Version no.]= LASTNONBLANKVALUE(Table1[Document no],max(Table1[Version no.])),"Latest","Archived")
new Column =
if([Version no] = maxx(filter(Table,[Document no] = earlier([Document no])),[Version no]),"Latest","Archived")
Please Watch/Like/Share My webinar on Time Intelligence: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
My Youtube Tips at: https://www.youtube.com/playlist?list=PLPaNVDMhUXGYrm5rm6ME6rjzKGSvT9Jmy
Appreciate your Kudos.