cancel
Showing results for
Did you mean:
Helper I

Current Month, Previous Months Counts Now Not Working

I can only assume this stopped working now that we are into a new year. It no longer calculates PREVIOUS MONTH, 2 MONTHS AGO, 3 MONTHS AGO, ...

It does calculate TOTAL COUNT THIS MONTH:

Total Count This Month =
COUNTX(
FILTER(
AND(
MONTH([Activity_Date])=MONTH(TODAY()),
YEAR([Activity_Date])=YEAR(TODAY())
)
),
)

Here is what I have for PREVIOUS MONTH that no longer works:

Total Count Last Month =
COUNTX(
FILTER(
MONTH([Activity_Date])=MONTH(TODAY()) -1
),
)

Any ideas?

2 ACCEPTED SOLUTIONS
Super User II

Hi @pbeeyeqs ,

quick and dirty.

Total Count Last Month =
COUNTX(
FILTER(
MONTH([Activity_Date])= IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) -1)
),
)

Regards,

Marcus

Dortmund - Germany
Please mark my post as solution, this will also help others.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."

Super User II

Hi @pbeeyeqs ,

another dirty hack..

``````Total Count Last Month =
COUNTX(
FILTER(
),
)``````

``````Total Count 2 Months Ago =
COUNTX(
FILTER(
),
)``````

Please mark my post as solution, this will also help others.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."

3 REPLIES 3
Super User II

Hi @pbeeyeqs ,

quick and dirty.

Total Count Last Month =
COUNTX(
FILTER(
MONTH([Activity_Date])= IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) -1)
),
)

Regards,

Marcus

Dortmund - Germany
Please mark my post as solution, this will also help others.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."

Helper I

That seems to work for previous month. How would it then figure 2 months ago, 3 months ago, ...

I have below for 2 months ago, but it doesn't seem to be correct:

Total Count 2 Months Ago =
COUNTX(
FILTER(
MONTH([Activity_Date])= IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) -2)
),
)
Super User II

Hi @pbeeyeqs ,

another dirty hack..

``````Total Count Last Month =
COUNTX(
FILTER(
),
)``````

``````Total Count 2 Months Ago =
COUNTX(
FILTER(
),
)``````

Please mark my post as solution, this will also help others.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."

Announcements

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.