Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi guys,
I am some Xero data pulling to report and a measure that displays the latest invoice amount which I then slice with customer data.
DAX measure below:
Last Invoice Amount =
VAR LastSalesDate =
CALCULATE (
MAX ( 'Unique Invoices'[Date] ),
FILTER ( 'Unique Invoices', 'Unique Invoices'[Type] = "ACCREC" )
)
RETURN
CALCULATE (
[Total Invoice Amount],
USERELATIONSHIP ( Dates[Date], 'Unique Invoices'[Date] ),
FILTER ( Dates, Dates[Date] = LastSalesDate )
)
The problem is I also slice the data by financial year. If I have the current financial year selected in the slicer, the above DAX works great. However if I have a previous financial year selected I get a blank result, obviously as the most recent invoice date is outside of that financial year.
Does anyone know how I could edit this to interact with the date slicer?
Cheers
Hi @MDodds ,
You can try using FILTER ( ALL(Dates), Dates[Date] = LastSalesDate )
Thanks djurecicK2.
This is about half way there. If I can't solve it fully I will go with this solution.
This displays the most recent invoice in the data, but essentially ignores the slicers. I want it to still operate with the slicers, so if I select FY2022 for example, it shows the last invoice in that year, not the last invoice in the full dataset.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |