Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello BI Community:
I am trying to create a calculated column that indicates if data for each school is the most recent based on a completion time.
The current column, isLastEntryforDay is calculated with this code:
isLastEntryforDay = if((TenDayCount[Completion time])=MAXX( FILTER( TenDayCount, TenDayCount[School]=EARLIER(TenDayCount[School]) ), TenDayCount[Completion time]), true(), false() )
However, I really want it to return true if it is the last entry based on the Day column. Not overall.
I would be grateful if anyone could help me modify the DAX (or provide an alternative solution) to accomplish this.
Thank you,
Michael
Solved! Go to Solution.
The solution I used to solve this was to create a new custom column
= Table.AddColumn(#"Replaced Errors", "SchoolDay", each [Day]&","&[Code])
Then, I used the same code as before to determine the most recent entry.
Michael
The solution I used to solve this was to create a new custom column
= Table.AddColumn(#"Replaced Errors", "SchoolDay", each [Day]&","&[Code])
Then, I used the same code as before to determine the most recent entry.
Michael
Hi @Michael1,
However, I really want it to return true if it is the last entry based on the Day column. Not overall.
I'm not sure I understand your requirement totally. Could you be more precisely with it by posting your expected result against the sample data you posted above?
Regards
So, regardless of month and year, if it is the highest day number? So, Jan 30th, 1956 would be the last day versus Dec 29, 2017?
Apologies if I am not understanding something.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
68 | |
60 | |
51 | |
36 | |
35 |
User | Count |
---|---|
84 | |
71 | |
56 | |
45 | |
43 |