Forum Discussion
Issue with Summarizing Status Count
- 8 years ago
Hi rocky09,
Based on my test, the formula below should work in your scenario.
Count = VAR maxDate = CALCULATE ( MAX ( Data[Date] ), FILTER ( ALL ( Data ), Data[Cat.] = EARLIER ( Data[Cat.] ) ) ) VAR minDate = CALCULATE ( MAX ( Data[Date] ), FILTER ( ALL ( Data ), Data[Cat.] = EARLIER ( Data[Cat.] ) ) ) RETURN IF ( Data[Status] = "Completed", 1, IF ( Data[Date] = maxDate, 1 + DATEDIFF ( minDate, maxDate, DAY ) / 10, 0 ) )Here is the sample pbix file for your reference. :smileyhappy:
Regards
Hi rocky09
One way of doing this .
In essence you want the count based on last status for each cat
First Add a calculated Column lets say "Last Date"
=
CALCULATE (
MAX ( Table1[Date] ),
FILTER ( table1, Table1[Cat.] = EARLIER ( Table1[Cat.] ) )
) Then another calculated Column named "Count"
= IF ( Table1[Date] = Table1[Last Date], 1, 0 )
Now Pivot with Status in Rows and Sum of Count in Values
- rocky098 years agoSolution Sage
Thank you for your kind reply.
However, It is not counting properly. It is ignoring some of the Completed, Inprogress and Rework.
- Zubair_Muhammad8 years agoCommunity Champion
Hi rocky09
After adding the 2 calculated columns, create a pivot table with "Status" on Row Field and "Count" on Value field
- rocky098 years agoSolution Sage
Hi,
I am getting Completed count properly. But, for In-progress, I am getting all count. It should count only latest Status.