Last transaction date

Hello all
I have this report, just for people to choose what they want to see, you know? After choosing the company, Cost center, year, month, etc my card, which sows the last transaction date shows the incorrect date.
I think the measure should be something like this:

Last Transaction Date =
CALCULATE (
    MAX ( Dates[Date] ),
    FILTER ( 'Main Data', 'Main Data'[Type] = "Actual" ),
    ALL ( Dates ) )

I guess, despite this measure doesn’t give me an error, it shows wrong answer. So, i guess there’s a rule somewhere that i don’t know.
Could you please explain the rule to me cose i think i do it everytime backwards.
Thank you very much
Pedro

Guess this will be hard to answer without knowing what you consider to be the correct answer…

If you want the users selections to be part of the Last transaction date calculation try this.
MAX( ‘Main Data’[Your Date Column] )

If you want to persist the filter on ‘Main Data’[Type] = “Actual”, just add that to the Filter Pane, Filters on this Visual section (you can lock and/or hide that filter in the Service).

I hope this is helpful.

Hey @Melissa and thank you for your email.
The idea is to have a measure on that page report, ignoring the filters.
So i came up with something like this :

Last Transaction Date = CALCULATE( MAX(Dates[Date] ), ALL(Dates) )
but this shows me the last date from date table and what i need is the last date from Main Data, you know? And your suggestion didn’t work also. Am i doing something wrong here?

Oh right, give this a go.

Last Transaction Date = MAXX( ALL (‘Main Data’), ‘Main Data’[Your Date Column] )

Awesome @Melissa! Thank you so much

To the contributor of this post. Thank you for sharing your experiences around Power BI, please don’t hesitate to add more discussion or add value to wherever you think you possess the experience or knowledge that can help others in our Ecosystem Groups. You can also help us in improving the Support forum further by answering the Enterprise DNA Forum User Experience Survey. We appreciate the initiative and your help in this group!