0
votes

I need to count how many items/rows where created in the past months are. general_report is the table name and [created] the date column format is in ormal dd/mm/yyyy hh:mm:ss as you can see here

For the goal, I have created this measure:

_created_last_month = COUNTROWS(FILTER(general_report,  [Created]  >= ( TODAY() - MONTH(TODAY() )  )))

I was also considering about creating a custom column which makes the same computation and then count how many items are valid in that column, with no success

1
You need previous month count only? - balaji
Specifically, I am doing 2 measures. One which counts item within one month and another within /above 6 months - TheSeller

1 Answers

0
votes

Here are some examples (maybe you have to replace semicolon with comma)

Counts created in actual month:

_created_this_month:=
CALCULATE(COUNT(general_report[created]);DATESBETWEEN(general_report[Date];date(YEAR(TODAY());MONTH(TODAY());1);TODAY()))

Counts created in prev. month:

_created_last_month:=
CALCULATE(COUNT(general_report[created]);DATESBETWEEN(general_report[Date];date(YEAR(TODAY()-30);MONTH(TODAY()-30);1);EOMONTH(TODAY();-1)))

Counts created in the last "full" 6 months, the actual is not includet

_created_last_6_months_without_the_actual_month:=
CALCULATE(COUNT(general_report[created]);DATESINPERIOD(general_report[Date];EOMONTH(date(YEAR(TODAY()-30);MONTH(TODAY()-30);1);0);-6;MONTH))