Forum Discussion
Last Month's Data
- 8 years ago
my data runs not from today as indicated in the formula, but from a random final date, usually the last day of the prior month.
What exact result are you expecting? Is the “prior month’s result” refers to the results from “today” subtracting one month? (So the final day is “today”).
As I tested, I have got a trade date column like:
Referring to your DAX, the final result becomes (the final day is 2017-12-31)
So I assume it is not the result set you want. (screenshot above)Hence, as a quick guess, I suggest you replace the
DATESBETWEEN('Totals'[Trade Date],
Date(YEAR(EDATE(today(),-1)),MONTH(EDATE(today(),-1)),1),
EOMONTH(today(),-1)))With
DATESINPERIOD('Totals'[Trade Date], TODAY(), -1, MONTH)
Then I get result ended up “today()”
Regards,
Charlie Liao
my data runs not from today as indicated in the formula, but from a random final date, usually the last day of the prior month.
What exact result are you expecting? Is the “prior month’s result” refers to the results from “today” subtracting one month? (So the final day is “today”).
As I tested, I have got a trade date column like:
Referring to your DAX, the final result becomes (the final day is 2017-12-31)
So I assume it is not the result set you want. (screenshot above)
Hence, as a quick guess, I suggest you replace the
DATESBETWEEN('Totals'[Trade Date],
Date(YEAR(EDATE(today(),-1)),MONTH(EDATE(today(),-1)),1),
EOMONTH(today(),-1)))
With
DATESINPERIOD('Totals'[Trade Date], TODAY(), -1, MONTH)
Then I get result ended up “today()”
Regards,
Charlie Liao
- wooand8 years agoHelper II
Many thanks Charlie, that works.