Put the distinct count in a calculated field of its own then reference the new calculated field in your calculation. You could even put both parts into calculated fields and then subtract one from the other.
Hi, @rribfilipe. Did @RichardAustin’s solution work for you? I am marking his reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community Q&A Forum!