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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
redhughes
Helper II
Helper II

MAX date IF

I have a table with "Date added" and "Week commencing", and I'd like to find the max Date added for each Week commencing:

 

Date addedWeek commencingValue
29/07/201929/07/201910
29/07/201905/08/201920
29/07/201912/08/201950
01/08/201929/07/201920
01/08/201905/08/201940
01/08/201912/08/2019100

 

So in this example the first line should have a max Date added of 01/08/2019. What's the best way of doing it - Query Editor or adding a new column to the table, and what formulas/functions can I use? thanks a lot for your help!

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @redhughes 

If you want to add a new column to the table:

 

NewColumn =
CALCULATE (
    MAX ( Table1[Date added] ),
    ALLEXCEPT ( Table1, Table1[Week commencing] )
)

 

 

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

Hi @redhughes 

If you want to add a new column to the table:

 

NewColumn =
CALCULATE (
    MAX ( Table1[Date added] ),
    ALLEXCEPT ( Table1, Table1[Week commencing] )
)

 

 

thank you!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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