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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.