Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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.
I am importing a series of CSV file and they all have a date in the file name. Ex:
2017-09-26.CSV
2017-10-23.CSV
etc.
I am able to combine them and create a date column based on the filename. Now I would like to add a column called [IsLatest, determine which is the most recent date, and have Yes or No in the column accordingly. I can do this in DAX with a custom column, but I wanted to stretch my M skills but I just can't figure it out. Any Power Query / M gurus who can point me in the right direction?
Solved! Go to Solution.
Hi @hymieho,
You can try a custom column like this:
List.Max(#"Changed Type"[Column1])
Best Regards,
Dale
Hi @hymieho,
You can try a custom column like this:
List.Max(#"Changed Type"[Column1])
Best Regards,
Dale
Works like a charm--thanks for the tip!
1. Add a (temporary) custom column as you mentioned with the List.Max(date)
2. Add a 2nd custom column that checks to see if [Date] = [Latest Date in group]
3. Remove the temp column
#"Added Conditional Column" = Table.AddColumn(#"Added Custom", "IsLatest", each if [Add Column with latest date] = [Date] then "Yes" else "No"),
#"Renamed Columns2" = Table.RenameColumns(#"Added Conditional Column",{{"Add Column with latest date", "Latest Date in group"}}),
#"Removed Columns1" = Table.RemoveColumns(#"Renamed Columns2",{"Latest Date in group"})
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |