Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I'm trying to create a "followed up" column in my response table which will return "yes" if a person with a matching user ID in the follow-ups table has a follow-up date greater than the latest response date. If no date exists in the follow-ups table or the date is prior to the latest response, the column should return "no".
Right now I'm doing this with 2 columns; The first returns the latest follow-up reply date from the follow-ups table. The second column returns whether the latest follow-up is greater than the response date.
I'm new to this and my approach works but seems inneficient.
Solved! Go to Solution.
Hi @Rustynom ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a calculated column.
Needs Follow-up = var _maxdate=MAXX(FILTER('Follow-Ups',[User ID]=Responses[User ID]),[Follow-uo reply date])
return IF(_maxdate>=[Latest Response Date],"Yes","No")
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Rustynom ,
According to the document, measures only consume memory during calculations and have better performance than computed columns. We recommend that you create a measure.
Measure_need =
var _followdate=CALCULATE(MAX('Follow-Ups'[Follow-uo reply date]),FILTER('Follow-Ups','Follow-Ups'[User ID]=RELATED('Responses'[User ID])))
return
IF(_followdate>SELECTEDVALUE('Responses'[Latest Response Date]),"Yes","No")
Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for the reply on this. I tried implementing your recommendation here, however I'm unable to structure the relationships in a way that will allow the RELATED('Responses'[User ID]) to be recognized by the measure.
I've also tinkered around with your attached file and below is the error I get when attempting to append additional data to both of the test datasets.
It seems the relationship cannot be structured as many to one if duplicates are contained within both data sets. Because we are measuring only the latest of a list follow-up replies against a list of many responses, both datasets will contain duplicate user IDs.
If there is some way of transforming the follow-up table’s duplicate User ID's to keep the rows with the latest follow-up reply date, that would probably let me implement your measure.
Hi @Rustynom ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a calculated column.
Needs Follow-up = var _maxdate=MAXX(FILTER('Follow-Ups',[User ID]=Responses[User ID]),[Follow-uo reply date])
return IF(_maxdate>=[Latest Response Date],"Yes","No")
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This worked! Thank you!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
23 | |
21 | |
20 | |
13 | |
12 |
User | Count |
---|---|
43 | |
31 | |
24 | |
22 | |
22 |