Forum Discussion
Filter the data using multiple values in different tables.
- 3 years ago
Hi xhulioberberi ,
Please try following DAX to create a measure:
DistinctCount = CALCULATE(DISTINCTCOUNT('Table2'[Activity]),FILTER(ALL('Table2'),'Table2'[ID] = SELECTEDVALUE('Table2'[ID])))The result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi xhulioberberi,
Test table1:
Test table2:
Relationship between two tables:
Create a measure:
Count_username = COUNT('Table1'[Username])
Put the measure into "Filters" - "is greater than 2" - "Apply filter"
Result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello v-yadongf-msft . Thank you very much for your reply. I appreciate it too much. The table I have created is a sample of what I am working for and I am using big data in my project. What I was trying to explain is that I want to filter all the persons in the username table that have the activity "LIM" "TOR" and "VAR". Sorry maybe I have not explained well and will try to explain again with more examples as below:
So the first table is a filtered table in one Visualization between two other tables. What I want to achieve is that I want to filter maybe with a measure all of the users that have the activity "LIM" "TOR" and "VAR". So based on this activity I want to get all the user that have this three activity. It might happen that one user have the same activity twice so and doesnt have the third one, so your filter will show him up because it measures the users that have show 3 times.
Thanks again for your time.
- v-yadongf-msft3 years agoCommunity Support
Hi xhulioberberi ,
Please try following DAX to create a measure:
DistinctCount = CALCULATE(DISTINCTCOUNT('Table2'[Activity]),FILTER(ALL('Table2'),'Table2'[ID] = SELECTEDVALUE('Table2'[ID])))The result you want:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.