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.
Solved! Go to Solution.
Hi @Torbenan ,
Try using a variable like below:
Last12Month invoiced = VAR LastInvDate = LASTDATE( Sales[Date] ) RETURN CALCULATE( SUM(Sales[Sales]), Sales[Date] > LastInvDate - 365 )
Hope it helps.
Cheers,
Fernando
Hi @Torbenan ,
Are you using your measure in a visual that is using the InvoiceDate column? LASTDATE() will evaluate the last date based upon the current context whereas TODAY() does not take the context into account of course..
You could try calculating the LASTDATE in a variable beforehand using an ALL statement to remove any context filters from your date column?
Hi @Torbenan ,
Try using a variable like below:
Last12Month invoiced = VAR LastInvDate = LASTDATE( Sales[Date] ) RETURN CALCULATE( SUM(Sales[Sales]), Sales[Date] > LastInvDate - 365 )
Hope it helps.
Cheers,
Fernando
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |