Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I'm trying to calculate the last Sale Amount in a Sales Table. (See screenshot of my model below) My measure is as follows;
Last Sale Amount = CALCULATE( [Total Sales] , LASTNONBLANK( Dates[Date] , [Total Sales] ) )
The moment I make the Date and Invoice tables bi-directional it works. But then breaks alot of my other measures with below screenshot errors.
Any help would be great.
Thank you
Cameron
Solved! Go to Solution.
I received the solution to this on a different forum. Pasted below.
Last Sales Amount =
VAR LastSalesDate = MAX( Invoices[Date] )
RETURN
CALCULATE( [Total Sales] ,
FILTER( ALL( Dates ),
Dates[Date] = LastSalesDate ))
Hi,
What is the relationship between Sales table and Invoice table? If you set it a single cross filter, how is the result?
It is not possible to create a direct relationship between the Invoices table and Sales Table. Indirectly there is a pointer from Sales to Journals and then Journals to Invoices.
I received the solution to this on a different forum. Pasted below.
Last Sales Amount =
VAR LastSalesDate = MAX( Invoices[Date] )
RETURN
CALCULATE( [Total Sales] ,
FILTER( ALL( Dates ),
Dates[Date] = LastSalesDate ))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
80 | |
67 | |
63 |
User | Count |
---|---|
147 | |
110 | |
108 | |
85 | |
64 |