Forum Discussion
Question re matrix visualization filtering
- 5 years ago
Anonymous
You are getting the error because your fields 'TableName'[TimestampUTC].[Month] and/or 'TableName'[TimestampUTC].[Year] are not type integer (they are type text).
MONTH(TODAY()) returns the current month's number, therefore an integer.
YEAR(TODAY()))) returns the current year's number, therefore an integer.
So you either convert both your fields to type integer (using VALUE) or you convert the above expressions to type text (using FORMAT).
Apologies since I should have made the measure clearer. So:
Counts this month = CALCULATE([your count measure], FILTER(Date table, Date table [Month Number] = MONTH(TODAY()) && Date table [Year Number] = YEAR(TODAY())))
Try:
CountsThisMonth = CALCULATE(COUNTROWS('TableName'), FILTER('TableName', VALUE('TableName'[TimestampUTC].[Month]) = MONTH(TODAY()) && VALUE('TableName'[TimestampUTC].[Year]) = YEAR(TODAY())))
PaulDBrown I see, I get the logic of expression now. I modified it a little bit, and it worked beautifully. Thank you!