I have two tables. Table 1 contains individual information. Table 2 contains the Goal information and I am trying to figure out the % to goal. the tables are joined on Year.
Table1
Name | Residency | Year |
Tom | Y | 2018 |
Paul | Y | 2017 |
Harry | N | 2018 |
Mary | N | 2018 |
Jane | N | 2017 |
Donna | N | 2018 |
Table2
Year | Active | Goal |
2018 | Y | 100 |
2017 | N | 20 |
I create a measure to count the number of Residents = Y
Measure1 :=Countx(table1, table1[residency]="Y").
What I want to do is filter measure1 by year and use the goal for that year's goal as the denominator.
I created a measure2 that sums the goals in the hope that the slicer would reference the correct goal. - It didn't work.
Measure2 := sum(table2[Goal])
The calculation I'm going for is Measure1/measure2 and measure2 will be the the goal for the year.
Any help is greatly apprecaited.