Forum Discussion
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 ID | Case Name | Flag | Customer Id | Distinct Count | ||
| 1 | a | yes | 1 | 1 | ||
| 1 | b | yes | 2 | 1 | ||
| 1 | c | no | 3 | 0 | ||
| 2 | a | yes | 4 | 1 | ||
| 2 | b | yes | total | 4 | ||
| 3 | a | no | ||||
| 3 | b | no | ||||
| 3 | c | no | ||||
| 4 | a | yes | ||||
| 4 | b | no | ||||
| 4 | c | no |
please help me out with Dax and filters
Thank you
3 Replies
- VasTgMemorable Member
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.
- ssharm43Helper I
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.
- daxCommunity 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 ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.