Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Dear Power BI Community
Hopefully with this visualisation I can better represent my desired output.
We are looking for the date/time difference of an ID from the first to the last Occurence
It is not necessarily important that the output is in the corresponding line. What is important is that somewhere there is information that, for example, ID MDY5MP takes approx. 3,999 days from first to lasttime (maybe best approach in a measure, no?)
Any ideas how to solve this problem?
Thank you very much for your contribution.
Cheers
qwertzuiop
Solved! Go to Solution.
Hello @qwertzuiop , you have to group it by Member ID then you can do that.
Use below measure to get the result as required.
Duration =
Var Start_Date = CALCULATE(MIN(Data[CS_Date]),ALLEXCEPT(Data,Data[CS_MessageID]))
Var Last_Date = CALCULATE(MAX(Data[CS_Date]),ALLEXCEPT(Data,Data[CS_MessageID]))
Var Result = DATEDIFF(Start_Date,Last_Date,DAY)
Return
Result
Result will be in days.
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
Hello @qwertzuiop , you have to group it by Member ID then you can do that.
Use below measure to get the result as required.
Duration =
Var Start_Date = CALCULATE(MIN(Data[CS_Date]),ALLEXCEPT(Data,Data[CS_MessageID]))
Var Last_Date = CALCULATE(MAX(Data[CS_Date]),ALLEXCEPT(Data,Data[CS_MessageID]))
Var Result = DATEDIFF(Start_Date,Last_Date,DAY)
Return
Result
Result will be in days.
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
Check out the May 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
68 | |
67 | |
45 | |
42 |
User | Count |
---|---|
47 | |
38 | |
28 | |
28 | |
27 |