cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bhmiller89 Member
Member

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

Accepted Solutions
Super User IV
Super User IV

Re: Getting a value based on the MAX Date

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
Super User IV
Super User IV

Re: Getting a value based on the MAX Date

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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors