This should be possible. A question: if the query is run on a weekend, what is your definition of "latest weekend?" For example, I'm writing this on a Saturday. If I ran the viz today, should I see just today? The previous weekend but not today? Same question for Sunday. Once I understand these detailed rules, I think I can create a formula for you.
It would also greatly help if you can post an example packaged workbook, showing what you have accomplished so far. If your data is confidential, please see Anonymize your Tableau Package Data for Sharing |Tableau Support Community.