Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
For example, let's say I have two tables. The first one is 'Dates':
| School | Date |
| School A | 10/15 |
| School A | 10/22 |
| School B | 10/11 |
| School B | 10/18 |
| School C | 10/12 |
| School C | 10/19 |
The second one is 'Enrollment':
| School | Enrollment Date |
| School A | 10/11 |
| School A | 10/12 |
| School A | 10/12 |
| School A | 10/13 |
| School A | 10/21 |
| School B | 10/9 |
| School B | 10/9 |
| School B | 10/10 |
| School B | 10/17 |
| School B | 10/18 |
| School C | 10/11 |
| School C | 10/12 |
| School C | 10/19 |
| School C | 10/19 |
I want an output that generates the number of 'Enrollment' rows BEFORE OR THE DAY OF the specific school and date in 'Dates' table, so it should look something like this:
| School | Date | Cumulative |
| School A | 10/15 | 4 |
| School A | 10/22 | 5 |
| School B | 10/11 | 3 |
| School B | 10/18 | 5 |
| School C | 10/12 | 2 |
| School C | 10/19 | 4 |
Is there a measure I can write where this table visual is possible?
Solved! Go to Solution.
@BBHouston , new column in table 1
countx(filter(table2, Table2[School]= table1[School] && table2[Enrollment Date] <= Table1[Date]),Table2[School])
@BBHouston , new column in table 1
countx(filter(table2, Table2[School]= table1[School] && table2[Enrollment Date] <= Table1[Date]),Table2[School])
| User | Count |
|---|---|
| 57 | |
| 43 | |
| 32 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |