Forum Discussion
Count Documents Issued within Certain Month
- Anonymous5 years ago
Hi nr83 ,
The following is my solution, please point out if it is not right.
1.Create a calculated table by New table under Calculations. Make sure that the new table is not related to the old table.
Slicer = DISTINCT ( SELECTCOLUMNS ( FILTER ( 'Table', [Workflow Start] <> BLANK () ), "YearMonth", YEAR ( [Workflow Start] ) & "-" & FORMAT ( MONTH ( [Workflow Start] ), "00" ) ) )2.Create a measure to count the YearMonth which is selected.
Count YearMonth = CALCULATE ( COUNT ( 'Table'[Workflow Start] ), FILTER ( 'Table', MONTH ( 'Table'[Workflow Start] ) = VALUE ( RIGHT ( SELECTEDVALUE ( 'Slicer'[YearMonth] ), 2 ) ) && YEAR ( 'Table'[Workflow Start] ) = VALUE ( LEFT ( SELECTEDVALUE ( 'Slicer'[YearMonth] ), 4 ) ) ) )3.The result is this.
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi nr83 ,
The following is my solution, please point out if it is not right.
1.Create a calculated table by New table under Calculations. Make sure that the new table is not related to the old table.
Slicer =
DISTINCT (
SELECTCOLUMNS (
FILTER ( 'Table', [Workflow Start] <> BLANK () ),
"YearMonth",
YEAR ( [Workflow Start] ) & "-"
& FORMAT ( MONTH ( [Workflow Start] ), "00" )
)
)
2.Create a measure to count the YearMonth which is selected.
Count YearMonth =
CALCULATE (
COUNT ( 'Table'[Workflow Start] ),
FILTER (
'Table',
MONTH ( 'Table'[Workflow Start] )
= VALUE ( RIGHT ( SELECTEDVALUE ( 'Slicer'[YearMonth] ), 2 ) )
&& YEAR ( 'Table'[Workflow Start] )
= VALUE ( LEFT ( SELECTEDVALUE ( 'Slicer'[YearMonth] ), 4 ) )
)
)
3.The result is this.
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.