Forum Discussion
DAX Measure SelectedValue in Values, how to use inactive relationship filter
- 6 years ago
I ended up creating a calculated table:
Overdue_Incident_Table = SELECTCOLUMNS(FILTER(Incident_Table, Incident_Table[overdue_flag] = "Y"), "Case Number", Incident_Table[Incident_ID], "Assigned Date Key", Incident_Table[DateKey_Assign], "Assigned To", Incident_Table[Employee_Assigned])Then I linked the "Assigned Date Key" from this table to my DateList table, and the "Assigned To" to my Personnel table and it works for what I need.
I'd still like to know if there's an easier/better way to accomplish this without resorting to creating a whole other table...?
I created the Distinct ID table and tried the EmpAssignedTestMeasure and it returned all the rows. I even tried coding in some of the values like this:
EmpAssignedTestMeasure =
COUNTROWS (
FILTER (
ALL ( 'Incident_Table' ),
'Incident_Table'[Incident_ID] IN FILTERS ( DistinctIDTable[Incident_ID] )
&& 'Incident_Table'[overdue_flag] = "Y"
&& 'Incident_Table'[Employee_Assigned] = SELECTEDVALUE(Personnel[Emp_Num])
&& 'Incident_Table'[DateKey_Assigned] >= 1462 && 'Incident_Table'[DateKey_Assigned] <= 1551
)
) + 0
But it still is returning all rows, ignoring the DateKey altogether (showing me records dated after 3/31/2019 which is datekey 1551).
I ended up creating a calculated table:
Overdue_Incident_Table = SELECTCOLUMNS(FILTER(Incident_Table, Incident_Table[overdue_flag] = "Y"), "Case Number", Incident_Table[Incident_ID], "Assigned Date Key", Incident_Table[DateKey_Assign], "Assigned To", Incident_Table[Employee_Assigned])
Then I linked the "Assigned Date Key" from this table to my DateList table, and the "Assigned To" to my Personnel table and it works for what I need.
I'd still like to know if there's an easier/better way to accomplish this without resorting to creating a whole other table...?