Forum Discussion
Slicer - How can I count selected months?
Can you post your Date table? How is the slicer being created? Like I said earlier, if the months are not being filtered directly, then you need to use ISCROSSFILTERED.
Hi,
I have tested both ISFILTERED and ISCROSSFILTERED - below you'll find the screenshot from the table field:
Slicer (Timeline) is configured only with the "Date" field:
Again - many thanks for your support :)
- vega8 years ago
Resolver III
Does your date table have a months column?
- posterme8 years agoFrequent Visitor
Hi, its only a column defined as date field...
UPDATE:
And as I written in my first message,
with COUNT('TABLE'[Date].[Month]) the Value is 1096,
with DISTINCTCOUNT('TABLE'[Date].[Month]) it is 12 ...
But what is "1096" ? :)
- vega8 years ago
Resolver III
I believe 1096 is the number of dates in your date column
- YellOwBoyz8 years agoNew Member
There is certainly more optimize way to do it.
But for example you can duplicate your date column convert it into a type text, and concatenate the year and the month.
And then do a DISTINCTCOUNT of your new column.
Example of M query to get your year and month
Text.Range([Date], 6,4) & Text.Range([Date], 3, 2)