Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
helen_p
Frequent Visitor

DAX expression which will help filter out NON duplicate values

Dear community
 
It has been a while since I have needed some support but was wondering if someone could help me with a DAX expression
 
I will try and highlight the data structure and the aim
 
Aim:  In a stacked bar chart I wish to show only ID's who have had multiple Care groups.   The visual could look a bit like this
 
helen_p_1-1662490986897.png

 

Consideration: I felt that a DAX expression would be useful so I can count the ID's and then filter on that DAX on the visual where the Count is greater than 1 
 
Data looks a bit like this:
 
ID              Care Group
12345               A
12345               B
12344               R 
12344               T  
12346               M
12347               P
12367               B
12367               C
 
 
The stacked bar chart in this instant should NOT include those patients who only have 1 entry I.e.  12346 and 12347
 
Kind Regards
Helen
 
2 REPLIES 2
Anonymous
Not applicable

Hi @helen_p ,

 

Try using this measure as a visual filter.

Measure = CALCULATE(COUNT('Table'[Care Group]),ALLEXCEPT('Table','Table'[ID]))

vcgaomsft_0-1662516380589.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

tamerj1
Super User
Super User

Hi @helen_p 
Please try

=
COUNTROWS (
    FILTER (
        VALUES ( Patients[ID] ),
        CALCULATE ( COUNTA ( Patients[Care Group] ) ) > 1
    )
)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.