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

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

Reply
ssharm43
Helper I
Helper I

Distinct count with group column

Hi everyone,

I do not know if I am posting on apropiate platform, pardon me if I am wrong.

I am looking for a solution where I have distinct records but I am looking to calculate distinct Id with following situation.

If I am applying flag filter I am getting distinct ID's but when there is not visual filter then it should count overall distinct count.

 

example of dataset and result is below:

Customer IDCase NameFlag  Customer IdDistinct Count
1ayes  11
1byes  21
1cno  30
2ayes  41
2byes  total4
3ano    
3bno    
3cno    
4ayes    
4bno    
4cno    

 

please help me out with Dax and filters

 

Thank you

3 REPLIES 3
VasTg
Memorable Member
Memorable Member

@ssharm43 

 

Is the "Distinct Count" in your sample the expected output or the entire visual on the right? 

 

You want to filter Flag=Yes and see the visual? Need more explanation.

Connect on LinkedIn

Yes, I want on visual like visual card, and It is like overall distinct count. 
situation is like:

 

Distinct count of "ID" if "flag" is "Yes" is for any of the "cases", i.e count the Id only once, negelect the "No" from flag and
Distinct count of "ID" if "flag" is "No" is for all the "cases", i.e count the Id only once.

 

Hope you understand now.

dax
Community Support
Community Support

Hi @ssharm43 , 

I am not sure whether what is your detailed requirement, you could refer to my sample for details. If this is not what you want,please correct me and inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

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.