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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
drewP76
Frequent Visitor

Cant get Max date

Hello,

I'm new, tips are appreciated, thanks.

 

I want to return the most recent date for each computer in my data set.  My data set is from multiple CSV files in a folder (all CSV files are formated the same).  The formula I am using is returning the most recent date for each computer in each CSV file (which I dont want).  For example ( [Last Updated] is my calculated column )

 

FileName---------ComputerUpdated-------Last Updated---
06-01-2020.csvA05-15-202005-15-2020
06-01-2020.csvA03-21-202005-15-2020
06-01-2020.csvB03-20-202003-20-2020
06-01-2020.csvC03-19-202003-19-2020
04-30-2020.csvA03-21-202003-21-2020

 

Above

  • I want the red date to = 05-15-2020
  • [FileName] is a column that PowerBI created for me (I like it being there and want to keep it), this column is not in my CSV files

I dont know how to get the filter to ignore the [FileName] column.  My formula:

 

Last Updated = 
VAR CurrentComputer = [Computer]
RETURN
MAXX(
Filter (
All (MyCsvCollection),
MyCsvCollection[Computer] = CurrentComputer
),
[Updated]
)

I have also:

  • Added a new Calendar table, set it as a date table
  • Created relationships (Calendar[Date] --> MyCsvCollection[Updated])

But I'm missing something.  I feel I'm close.  Any tips??

1 REPLY 1
mahoneypat
Microsoft Employee
Microsoft Employee

Please try this column expression

 

Last Update = CALCULATE(MAX(MyCSVCollection[Updated]), ALLEXCEPT(MyCSVCollection, MyCSVCollection[Computer]))

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.