You seem to be forgetting that the relationship is based on RowID, and apparently there're several AbsenceGroups for a single AbsenceCode.
DAX shows all unrelated rows, but calculated column correct
luki zw
21
Reputation points
Hi, I have a strange behaviour in my model which makes me think I just don't understand relationships right.
(SSAT Tabular, Comp level 1500, Client Excel Pivot table)
Following Scenario (hard to explain):
- I have two tables, AbsenceClaim und Absences which are related by RowID
- The RowID-Column is made of AbsenceCode and AbsenceGroup in both tables
- RowID is unique in AbsenceClaim, so it's 1 (AbsenceClaim) : N (Absences) - each absence has a claim (see first 3 attachments)
- I have a measure SickDays which just sums up the days column in Absences
- When i drag the AbsenceCode field from the ABSENCES Table, everything is correct
- When i add a calculatedColumn in the ABSENCES Table (just for testing purposes) it correctly retrieves the AbsenceClaim-Column (see "FromRelatedTable"-column)
- Excel lists the correct column (Absences[AbsenceCode] is the same as the calculated column) (Attachment 4)
- BUT now the strange thing (Attachment 5): When i drag the AbsenceCode field from the related AbsenceClaim table, it lists all possible AbsenceCodes
- BUT if i drag any other item from AbsenceClaim (e.g. AbsenceGroup) everything works as expected, too.
I've tried single direction and both directions for the relationship, it doesn't make a difference?
What am I getting wrong?!
Thanks in advance
Lukas
Table Absences:
Table AbsenceClaims:
Relationship:
OK with calculated column (=RELATED(AbsenceClaim[AbsenceCode]))
?????: