Forum Discussion
COUNT STATUS BY CURRENT MONTH
- 3 years ago
Hi third_hicana ,
You can try this method:
First of all, you need to change your date column to format "Date", not "text".
You can change it by this:
Right click the column and select Change Type and then Using locale.
Create a table first:
Status = VALUES('Sample Table'[Status])Then create a measure:
Count_per_status_of_current_month = CALCULATE ( COUNTROWS ( 'Sample Table' ), FILTER ( 'Sample Table', DATEDIFF ( [Date Created], TODAY (), MONTH ) = 1 && [Status] = MAX ( 'Status'[Status] ) ) )Hope this helps you.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-yinliw-msft The Date Created was not able to detect while I'm writing the DAX. I made a relationship between the created Table and the Sample Data. But the month is unknown in DAX. Thanks
Hi third_hicana ,
You can try this method:
First of all, you need to change your date column to format "Date", not "text".
You can change it by this:
Right click the column and select Change Type and then Using locale.
Create a table first:
Status = VALUES('Sample Table'[Status])
Then create a measure:
Count_per_status_of_current_month =
CALCULATE (
COUNTROWS ( 'Sample Table' ),
FILTER (
'Sample Table',
DATEDIFF ( [Date Created], TODAY (), MONTH ) = 1
&& [Status] = MAX ( 'Status'[Status] )
)
)
Hope this helps you.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.