Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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!
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
33 | |
15 | |
14 | |
13 | |
9 |
User | Count |
---|---|
60 | |
23 | |
22 | |
19 | |
13 |