Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LIWO
New Member

DAX Measure Help

Hello

I've got this setup in Power BI:

LIWO_0-1721976386871.png

I'm trying to create a measure, which can provide the "startdate" of a specific "type" (Tabel 1) for a visual with a list of "SocialSecurityNo" from Tabel 3.
But I can't seem to get the date for a specific student - I get the same (max)date for everybody. I have tried a lot of formulas and completely lost track of them 😉
Anyone who can help me with a measure, I can try?

 

Regards,
Lisa

1 ACCEPTED SOLUTION

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?

 

11.PNG

 

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())
 
11.PNG
 
pls see the attachment below.
 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
LIWO
New Member

Thank you so much @ryan_mayu . It works perfectly 🙂

LIWO
New Member

Thank you so much @ryan_mayu - it works perfectly! 

LIWO
New Member

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?

 

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?

 

11.PNG

 

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())
 
11.PNG
 
pls see the attachment below.
 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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 🙂 

ryan_mayu
Super User
Super User

what's the expected output based on the sample data you provided?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors