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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.