Forum Discussion
Relationships and Slicer
Hi
I'm trying to sort out the relationships shown in my screenshot below in order to get my DeptCode slicer working with my sumabsenthrs measure on the visual level.
My sumabsenthrs measure sums the [ern_worked_hrs] in the Payroll Table with a filter that selects only those that have a certain [pay_code]:
sumabsenthrs = CALCULATE(SUM(Payroll[ern_worked_hrs]),RELATEDTABLE(PayCodesTable),PayCodesTable[bi_pay_code]="absent")
The Payroll Transactions Table contains the department in the [ypt_department] column which is currently linked to the DeptTable with [DeptCode]. And the Payroll and Payroll Transactions Table are linked by the [row_id] column in each.
I have been able to get the sumabsenthrs measure to work with slicers from the DateTable but not the DeptTable.
Any help is much appreciated.
Thanks
Relationships
6 Replies
- Greg_DecklerCommunity Champion
So, if you create a DeptTable slicer and then add a table with "Payroll Transactions" and put the row_id column in it, I expect that the slicer filters that table, correct?
Now, if you add a table with "Payroll" table and put the row_id column in it, does that filter correct as well?
- SpencerHelper II
Yes Greg_Deckler those both filter correctly.
- Greg_DecklerCommunity Champion
OK, so the next question is if you add the PayCodes table, does it filter correctly? I am assuming it doesn't but basically am trying to remove this from the realm of a DAX calculation and prove that it is entirely related to table relationships.