- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Creating A Function To Return Values based On Earliest Date
I have a table in power query and it has multiple students (unique Identifiers) and multiple colu,ns. I need to write a function that will return the qualification earned during each semester based on the earliest date earned during that semester. Each student has earned the same qualification multiple times in the same semester. I am wanting the table to show the qualification earned only once and based on the earliest date it was earned during that semester. Is this possible?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @bkanderso ,
I made a sample data and below is my solution for you reference.
Data:
1.Select the Student column and group by.
2.If you also want to get rows before other columns, expand the All Rows.
3.Add a custom column for filtering.
4.Filter to keep the rows with 1.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you, this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi, @bkanderso add "semester" into grouping (along with "student") if needed
groups = Table.Group(Source, {"Student"}, {{"all", each Table.Min(_, "Date")}}),
z = Table.FromRecords(groups[all])
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @bkanderso ,
I made a sample data and below is my solution for you reference.
Data:
1.Select the Student column and group by.
2.If you also want to get rows before other columns, expand the All Rows.
3.Add a custom column for filtering.
4.Filter to keep the rows with 1.
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.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
08-20-2024 06:48 PM | |||
03-27-2024 07:56 AM | |||
12-14-2023 06:13 AM | |||
02-17-2024 11:15 AM | |||
07-04-2024 10:37 PM |
User | Count |
---|---|
29 | |
26 | |
16 | |
11 | |
10 |
User | Count |
---|---|
28 | |
25 | |
21 | |
16 | |
12 |