Forum Discussion
DAX Measure Help
- 2 years ago
i think your data model is not good.
table 2 and 3 are linked by student ID. That is a many to many relationship.
ID 300 may have two social security no and each one will have two agreeement?
I used a,b,c,d,e for social security No.
measure =VAR _id=maxx(FILTER(Table2,Table2[StudentID]=max(Table3[StudentID])),Table2[AgreementID])VAR _type=maxx(FILTER(Table1,Table1[AgreementID]=_id),Table1[Type])return if(_type="VFO",maxx(FILTER(Table1,Table1[AgreementID]=_id),Table1[Start]),blank())pls see the attachment below.
I have a visual with SocialScurityNo.
I need to add for exaple the startdate for type "VFO" if the student has any "type VFO" - else it need to be blank.
Do this answer your question?
- ryan_mayu2 years agoSuper User
i think your data model is not good.
table 2 and 3 are linked by student ID. That is a many to many relationship.
ID 300 may have two social security no and each one will have two agreeement?
I used a,b,c,d,e for social security No.
measure =VAR _id=maxx(FILTER(Table2,Table2[StudentID]=max(Table3[StudentID])),Table2[AgreementID])VAR _type=maxx(FILTER(Table1,Table1[AgreementID]=_id),Table1[Type])return if(_type="VFO",maxx(FILTER(Table1,Table1[AgreementID]=_id),Table1[Start]),blank())pls see the attachment below.- Anonymous2 years agoNot applicable
Sorry. In tabel 3 there is only one Student ID per SpcialSecurityNo, so it will be fine, I guess. I will try to translate your measure into my datamodel 🙂