This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi,
Appreciate any help.
I have two tables – Attendance, Survey I don’t have any joining keys other than email and no way of determining to which survey they responded to if the same MS forms are used for multiple learnings.
Attendance
Course Name | Learning Date | Status | Form Key | |
Eve@gmail.com | Mathematics - 1 | 15/03/2026 | Completed | Form 1 |
Eve@gmail.com | Mathematics - 2 | 20/04/2026 | Completed | Form 1 |
Eve@gmail.com | Mathematics - 3 | 29/04/2026 | Completed | Form 2 |
Adam@gmail.com | Mathematics - 1 | 20/04/2026 | Registered | Form 1 |
Mathematics - 1 | 20/04/2026 | Completed | Form 1 | |
Jack@gmail.com | Mathematics - 3 | 29/04/2026 | Completed | Form 2 |
Survey
Form Key | Survey Date | Rating | |
Eve@gmail.com | Form 1 | 19/03/2026 | 5.0 |
Eve@gmail.com | Form 1 | 19/04/2026 | 2.0 |
Eve@gmail.com | Form 1 | 22/04/2026 | 3.8 |
Eve@gmail.com | Form 2 | 29/04/2026 | 2.9 |
Form 1 | 20/04/2026 | 4.0 | |
Form 1 | 21/04/2026 | 3.5 | |
Form 2 | 28/04/2026 | 2.6 | |
Form 2 | 30/04/2026 | 4.6 |
Now I need,
Ex
Solved! Go to Solution.
Hi @SRHR
Can you try these
Rank Valid Measure =
VAR LearningDate = SELECTEDVALUE(Attendance[Learning Date])
VAR Email = SELECTEDVALUE(Attendance[Email])
VAR FormKey = SELECTEDVALUE(Attendance[Form Key])
RETURN
IF(SELECTEDVALUE(Attendance[Status]) = "Completed" &&CALCULATE(
COUNTROWS(Survey),
FILTER(
Survey,
Survey[Email] = Email &&
Survey[Form Key] = FormKey &&
Survey[Survey Date] >= LearningDate &&
Survey[Survey Date] <= LearningDate + 2
) ) > 0,1,0)
Avg Rating Measure =
AVERAGEX(FILTER(
Survey,
VAR MatchLearningDate =
CALCULATE(MAX(Attendance[Learning Date]),
FILTER(
Attendance,
Attendance[Email] = Survey[Email] &&
Attendance[Form Key] = Survey[Form Key] && Attendance[Status] = "Completed"))
RETURN
NOT ISBLANK(MatchLearningDate) && Survey[Survey Date] >= MatchLearningDate &&
Survey[Survey Date] <= MatchLearningDate + 2),
Survey[Rating])
I understand the challenge of linking survey responses without a clear identifier.
Valid Survey Rank =
CALCULATE (
COUNTROWS ( Survey ),
FILTER (
Survey,
Survey[Email]
= EARLIER ( Attendance[Email] )
&& Survey[Form Key]
= EARLIER ( Attendance[Form Key] )
&& Survey[Survey Date] > Attendance[Learning Date]
)
)
This formula counts survey responses where the date is after the learning date for the same email and form.
Hi @SRHR,
We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support
Hi @SRHR,
We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.
@pcoley , @krishnakanth240 & @Juan-Power-bi ,Thanks for your prompt response
Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support
I understand the challenge of linking survey responses without a clear identifier.
Valid Survey Rank =
CALCULATE (
COUNTROWS ( Survey ),
FILTER (
Survey,
Survey[Email]
= EARLIER ( Attendance[Email] )
&& Survey[Form Key]
= EARLIER ( Attendance[Form Key] )
&& Survey[Survey Date] > Attendance[Learning Date]
)
)
This formula counts survey responses where the date is after the learning date for the same email and form.
Hi @SRHR
Can you try these
Rank Valid Measure =
VAR LearningDate = SELECTEDVALUE(Attendance[Learning Date])
VAR Email = SELECTEDVALUE(Attendance[Email])
VAR FormKey = SELECTEDVALUE(Attendance[Form Key])
RETURN
IF(SELECTEDVALUE(Attendance[Status]) = "Completed" &&CALCULATE(
COUNTROWS(Survey),
FILTER(
Survey,
Survey[Email] = Email &&
Survey[Form Key] = FormKey &&
Survey[Survey Date] >= LearningDate &&
Survey[Survey Date] <= LearningDate + 2
) ) > 0,1,0)
Avg Rating Measure =
AVERAGEX(FILTER(
Survey,
VAR MatchLearningDate =
CALCULATE(MAX(Attendance[Learning Date]),
FILTER(
Attendance,
Attendance[Email] = Survey[Email] &&
Attendance[Form Key] = Survey[Form Key] && Attendance[Status] = "Completed"))
RETURN
NOT ISBLANK(MatchLearningDate) && Survey[Survey Date] >= MatchLearningDate &&
Survey[Survey Date] <= MatchLearningDate + 2),
Survey[Rating])
Hola
the best approach is to do this in Power Query rather than DAX, create a custom column in Attendance that looks up matching survey rows by Email + Form Key within the date window. But if you want to keep it in DAX, here's an average rating measure:
daxAvg Valid Rating =
VAR LearningDate = MAX(Attendance[Learning Date])
VAR FormKey = MAX(Attendance[Form Key])
VAR ValidSurveys =
FILTER(
Survey,
Survey[Form Key] = FormKey
&& Survey[Survey Date] >= LearningDate
&& Survey[Survey Date] <= LearningDate + 2
&& Survey[Email] IN
CALCULATETABLE(
VALUES(Attendance[Email]),
Attendance[Status] = "Completed",
Attendance[Learning Date] = LearningDate,
Attendance[Form Key] = FormKey
)
)
RETURN
AVERAGEX(ValidSurveys, Survey[Rating])
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |