The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I have a Scorm learning dataset that has many duplicate records. This happens if a user starts a course and does not finish but comes back and finishes at a later date. The system creates a record for every attempt 😞
I need to filter and show the latest attempt with result
i.e.
Course ID | Complete | Employee ID | Completed Date
1 | 0 | 111 | 09-12-22
1 | 1 | 111 | 12-12-22
Solved! Go to Solution.
Hi, @briansull , one of the options for your measure:
status =
VAR course = MAX ( Table1[Course] )
VAR employee = MAX ( Table1[Employee] )
VAR dt =
CALCULATE (
MAX ( Table1[Date] ),
Table1[Employee] = employee,
Table1[Course] = course,
ALL ( Table1[Date] )
)
VAR res =
IF (
MAX ( Table1[Date] ) = dt,
CALCULATE (
MAX ( Table1[Completed] ),
Table1[Employee] = employee,
Table1[Course] = course
)
)
RETURN
res
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Hi, @briansull , one of the options for your measure:
status =
VAR course = MAX ( Table1[Course] )
VAR employee = MAX ( Table1[Employee] )
VAR dt =
CALCULATE (
MAX ( Table1[Date] ),
Table1[Employee] = employee,
Table1[Course] = course,
ALL ( Table1[Date] )
)
VAR res =
IF (
MAX ( Table1[Date] ) = dt,
CALCULATE (
MAX ( Table1[Completed] ),
Table1[Employee] = employee,
Table1[Course] = course
)
)
RETURN
res
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
I think that's it thank so much. I need to verify still but looks good
Hi @briansull please provide more clear requirements:
you want to see
per employee ID
the latest date
for column Completed Date only
Proud to be a Super User!
That is correct some_bih
Hi @briansull please find following measure and outuput
Did I answer correctly? Kudos appreciate / accept solution.
Proud to be a Super User!
Thank you Some_bih,
The measure is nearly correct but i need to list all courses with the one measure if completed or not completed. The proposed solution measure only brings back completed if set to 1
Hi @briansull check v2 below😊
Did I answer your question? Kudos appreciated / accept solution!
Proud to be a Super User!
Thank you
I am now getting all courses but still see duplicates
i.e. course 1 is complete, course 1 is not complete
Hi @briansull provide expected result for input
Proud to be a Super User!
Thank you. I need to show who hasn't completed courses either
i.e.
Table
Course 1 | Employee 2 | Completed 1 | Date 20-12-2022
Course 1 | Employee 2 | Completed 0 | Date 19-12-2022
Course 2 | Employee 2 | Completed 0 | Date 21-12-2002
Expected Results
Course 1 | Employee 2 | Completed 1 | Date 20-12-2022
Course 2 | Employee 2 | Completed 0 | Date 21-12-2002
User | Count |
---|---|
27 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |