eomonth vs edate

martingaleh

Board Regular
Joined
Jul 18, 2011
Messages
79
I have months in columns from a table called dates_d.
I want the revenue of the prior month, so I did
calculate([rev],filter(all(dates_d),dates_d[date]>=edate(mina(dates_d),-1)&&dates_d[date]<edate(mina(dates_d),0)))

Which works fine

But then I do
calculate([rev],filter(all(dates_d),dates_d[date]>=eomonth(mina(dates_d),-2)&&dates_d[date]<eomonth(mina(dates_d),-1)))
and it selects all the revenue as if there isn't a filter. It's almost as if the edate is keeping the dates_d filter context and eomonth is not before calculating the minimum date with which to get the beginning and end of the prior month.

But then, when I just show the eomonth calculation, it's for the right date.
 

Some videos you may like

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Watch MrExcel Video

Forum statistics

Threads
1,095,748
Messages
5,446,266
Members
405,392
Latest member
Steveoaktree1977

This Week's Hot Topics

Top