Count number of cases where status changes to a specific status

TheCman81

Well-known Member
Joined
Feb 28, 2012
Messages
535
I'm using an older version of PowerPivot for Excel 2010, 11.2.5 I think it is.

I have a PP table called Applications, with a bunch of fields but the 2 in question are AppRef and Status.

So for each stage of an application, it will get a new record for each decision. What I would like to get, is a count of all applications where the status has went from Refer to Complete.

So for example:

AppRef | Decision
1 Open
1 Refer
1 Complete

2 Open
2 Closed

3 Open
3 Refer
3 Continue
3 Complete

4 Open
4 Complete

So from the above example the count would be 2 from AppRef 1 & 3. So in essence, as long as each AppRef group has both Refer and Complete in it.

Thanks
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
This is using Excel 2013 PowerPivot.

Loaded table to PowerPivot

[TABLE="width: 148"]
<tbody>[TR]
[TD]AppRef[/TD]
[TD]Decision[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Open[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Refer[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Complete[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Open[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Closed[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Open[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Refer[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Continue[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Complete[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Open[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Complete[/TD]
[/TR]
</tbody>[/TABLE]


Added two calculated columns:

[DVaue]=IF([Decision]="Refer",1,0)+IF([Decision]="Complete",1,0)

[FlagRefCom]=CALCULATE(SUM([DValue]),FILTER(ALL('Table'),Table[AppRef]=EARLIER(Table[AppRef])))

Created a distinct count measure on AppRef:

dCount AppRef:=DISTINCTCOUNT([AppRef])


Drag PivotTable fields as follows:

FlagRefCom ===> FILTERS (apply filter on '2')
AppRef ======> ROWS
dCount AppRef ==>VALUES

[TABLE="width: 154"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Continuation from my last post...this measure should give the the distinct counts apps that have been 'Refer' and 'Complete'.

RefCom App Count:=CALCULATE([dCount AppRef],FILTER(Table,Table[FlagRefCom]=2))
 
Upvote 0

Forum statistics

Threads
1,225,726
Messages
6,186,669
Members
453,368
Latest member
xxtanka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top