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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
bhmiller89
Helper V
Helper V

Getting a value based on the MAX Date

I have a dataset that includes columns "Invoice Date" and "InvoiceAmt". I want to show the InvoiceAmt of the most recent Invoice (MAX Invoice Date) So that I can compare it to the Moving 3 Month Average of InvoiceAmt (Already calculated) 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @bhmiller89 

You can try the below for your MAX

Sales Last Invoice = 
CALCULATE(
    [Sales], -- this where you place your InvoiceAmt 
    TREATAS( 
        LASTDATE( Sales[OrderDateKey] ), -- this is where you place your Invoice Date
        'Calendar'[Date] 
    )
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski


 

View solution in original post

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @bhmiller89 

You can try the below for your MAX

Sales Last Invoice = 
CALCULATE(
    [Sales], -- this where you place your InvoiceAmt 
    TREATAS( 
        LASTDATE( Sales[OrderDateKey] ), -- this is where you place your Invoice Date
        'Calendar'[Date] 
    )
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski


 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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