Forum Discussion
Look for a value filtering by month
Hello, i'm totally new in DAX. Hope you can help me! I don't know what mesure can i do for this example: i have two tables, one of them has 6 different names and the other table has some of the names with the month (like the tables below). I would like to know (making a dynamic table that allows me filter by month) how many times appear the names in, for example, april (in that case only John appears 1 time in April and the others 0 times); or, for example, how many times appear the names in june (in that case John appears 2 times, Tom 1 time, and the others 0 times).
| Table 1 |
| Names |
| John |
| Michael |
| Jacob |
| Oliver |
| Jake |
| Tom |
| Table 2 | |
| Date | Names |
| Apr | John |
| May | John |
| May | John |
| Jun | John |
| Jun | John |
| Jun | Tom |
| Jul | Tom |
| Jul | Jacob |
| Aug | Jacob |
Actually the real case is another but this example is a representation of what i would need help.
Thank you so much for the reply 🙂 I really appreciate it.
hi Juan_91
if you need names column from table1, try like:
measure 1= CALCULATE( COUNTROWS(Table2), USERELATIONSHIP(Table1[Names],Table2[Names]) ) +0the point is to add +0 in the end.
it worked like:
8 Replies
- FreemanZ
Super User
- Juan_91Regular Visitor
Hi FreemanZ . Thanks for your reply. Actually i'm working with Power Pivot and Excel. And i would like to do a dynamic table in the excel with the data model. I'm looking for a dynamic table like Table 1 but with one more column containing how many times the names repeat in the month selected. I think i should create a measure with the tables, but i don't know what kind of it.
Hope i can exlain me well.Thanks again.
- FreemanZ
Super User