sorry for the very late response on this one, but maybe it’s still relevant.
You are very close to the solution! The reason why you (probably) get different numbers as in the process explorer component is that, if your target activity occurs multiple times in a case, you count that as many times, whereas in the process explorer stats, the case count (number of distinct cases) is shown if you selected the case count KPI.
The numbers should match if you switch to “Activity frequency” in the Process explorer.
In order to replicate the Process Explorer stats in “Case frequency”-mode, you can leave the SOURCE-Dimension, and add another dimension
COUNT ( DISTINCT TARGET ("YOUR_CASE_COLUMN_HERE") )
which counts the distinct cases for each target activity.
Now we need to add the restriction that the target activity should be a fixed activity. For that, simply add a component filter:
FILTER TARGET("YOUR_ACTIVITY_COLUMN_HERE") LIKE 'MY_TARGET_ACTIVITY_NAME_HERE';
One more remark and another possible reason for numbers that don’t match: In the filter (or in your CASE WHEN condition), you use LIKE instead of “=”. If no wildcards are contained in the string (as in your case), leading and trailing “%”-Wildcards are assumed, and the comparison is not case sensitive. So if this is not what you want, you should use “=” instead of LIKE.