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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
crolland
New Member

DAX Calculate - Filter max date on several columns

My original table is

 

Project  /  UpdateDate / FiscalYear

A   / 2022-04-01   /    FY2022-2023

B   / 2022-05-01   /     FY2022-2023

A   / 2022-05-01   /     FY2022-2023

A   / 2023-04-01   /      FY2023-2024

 

I am trying to find the latest update date per fiscal year.

 

Here is what I tried, with no success

 

TEST_table = /*FILTER(*/
        ADDCOLUMNS (
            FILTER(Epic_History, Epic_History[Update_FY] = "FY2022-2023"),
            "IfMax", CALCULATE (
                MAX ('JIRA Export'[Custom.Update] ),
                FILTER (Epic_History, Epic_History[Update_FY] = "FY2022-2023"
                &&  (Epic_History[Custom.Custom field (Epic Name)] = EARLIER(Epic_History[Custom.Custom field (Epic Name)])) ) )
            )/*, 
[IfMax] = Epic_History[Custom.Update]
)*/
 
AND I am still getting IfMax = 2023-04-01 (instead of 2022-05-01) even if  I added a filter (FY2022-2023). 
 
Need your help. THANKS !!
1 ACCEPTED SOLUTION
djurecic
Super User
Super User

Hi @crolland ,

 You could try the following:

Table2 = SUMMARIZE('Table','Table'[Project], 'Table'[FiscalYear], "Last Update",MAX('Table'[UpdateDate]))
 
Result:
New Table.PNG

Base table:

Capture1.PNG

 

Please consider accepting as solution if this has answered the question.

View solution in original post

4 REPLIES 4
crolland
New Member

Great ! Thank you very much for your help 🙂 

Anonymous
Not applicable

Hi @crolland ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_1-1669195765233.png

2. create a measure with below dax formula

Measure =
VAR cur_fy =
    SELECTEDVALUE ( 'Table'[Fiscal Year] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), 'Table'[Fiscal Year] = cur_fy )
RETURN
    MAXX ( tmp, [Update Date] )

3. add a table visual with [FiscalYear] column and measure

vbinbinyumsft_0-1669195750510.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Ashish_Mathur
Super User
Super User

Hi,

I am confused because you have a Project column there as well.  Clearly show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
djurecic
Super User
Super User

Hi @crolland ,

 You could try the following:

Table2 = SUMMARIZE('Table','Table'[Project], 'Table'[FiscalYear], "Last Update",MAX('Table'[UpdateDate]))
 
Result:
New Table.PNG

Base table:

Capture1.PNG

 

Please consider accepting as solution if this has answered the question.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.