Use the following measures
Pie = UNION ( VALUES ( Products[Category] ), { { "Remaining" } } )
Shows a single-column table
Category
--------
A
B
C
D
Remaining
and use this measure
CountProducts =
IF (
SELECTEDVALUE ( Pie[Category] ) = "Remaining",
CALCULATE (
COUNT ( Products[Product] ),
ALL ( Products[Category] ),
NOT ( Products[Category] IN VALUES ( Products[Category] ) )
),
CALCULATE (
COUNT ( Products[Product] ),
FILTER ( Products, Products[Category] IN VALUES ( Pie[Category] ) )
)
)
To get the result in such a way
Want to learn more about Power Bi, CheckOut: power bi tutorial
We also provide Power BI Online Course, Enroll now!