Forum Discussion
Count Completion Item Per Month
I have created a calendar auto table and trying to do a stacked chart to show open vs closed items per month. I could not return the count completed item per month?
Anonymous wrote:
Sorry, I got one problem. it is showing a high value of the blank completion item. How do I resolve it?
I'm not sure what you mean by "high value" - are you possibly saying you do not want to count rows with no completion date? If so you could just add this condition to the calculate expression.
eg.
CountClosedItemPerMonth =
CALCULATE(countrows(TABLE),
NOT( ISBLANK( TABLE[Completion Date] ) )
USERELATIONSHIP(TABLE[Completion Date],'Date'[Date])
)
5 Replies
- d_gosbellSuper User
So the expression you have used will count rows that are on or after the last day of the selected period. To count rows with a closed date in the selected month you would normally either create a relationship to the closed date, then you could use a simple countrows expression. Or you could do something like the following pattern
CountClosedItemPerMonth =VAR startOfPeriod = MIN('Date'[Date])
VAR endOfPeriod = MAX('Date'[Date])RETURNCALCULATE( COUNTROWS('Table'),'table'[Completion Date] >= startOfPeriod,'table'[Completion Date] <= endOfPeriod)- AnonymousNot applicable
Sorry, I got one problem. it is showing a high value of the blank completion item. How do I resolve it?
I'm using the following formula:
CountClosedItemPerMonth = CALCULATE(countrows(TABLE),USERELATIONSHIP(TABLE[Completion Date],'Date'[Date]))- d_gosbellSuper User
Anonymous wrote:
Sorry, I got one problem. it is showing a high value of the blank completion item. How do I resolve it?
I'm not sure what you mean by "high value" - are you possibly saying you do not want to count rows with no completion date? If so you could just add this condition to the calculate expression.
eg.
CountClosedItemPerMonth =
CALCULATE(countrows(TABLE),
NOT( ISBLANK( TABLE[Completion Date] ) )
USERELATIONSHIP(TABLE[Completion Date],'Date'[Date])
)
- Ashish_MathurSuper User
Hi,
Share some data and show the expected result.