Hi all,
I have the follow example set 'Events Completion':
user_id | date | time | subject_title |
1416 | 6-8-2018 | 09:37:02 | Session 1 A |
1416 | 6-8-2018 | 09:37:00 | Session 2 A |
208 | 6-8-2018 | 09:08:21 | Exercise 1 |
1095 | 6-8-2018 | 08:39:18 | Session 100 |
1095 | 6-8-2018 | 08:39:14 | Exercise 10 |
506 | 6-8-2018 | 07:57:21 | Action 2 |
506 | 6-8-2018 | 07:57:17 | Action 1 |
844 | 6-8-2018 | 05:23:34 | Step 3 |
844 | 6-8-2018 | 05:23:07 | Step 2 |
844 | 5-8-2018 | 05:22:46 | Step 1 |
844 | 5-8-2018 | 05:22:20 | Step 40 |
From this set I would like to filter on User_ID (unique) and Date-time (latest) and I would see for each filtered item the subject title.
So, when I create a visualizing table I would see:
user_id | date | time | subject_title |
1416 | 6-8-2018 | 09:37:02 | Session 1 A |
208 | 6-8-2018 | 09:08:21 | Exercise 1 |
1095 | 6-8-2018 | 08:39:18 | Session 100 |
506 | 6-8-2018 | 07:57:21 | Action 2 |
844 | 6-8-2018 | 05:23:34 | Step 3 |
I have tried multiple things like LOOKUPVALUE and FIRSTNONBLANK, but I can't figure it out.
I did manage to get only the latest date-time via:
LastCompletionMoment = CALCULATE(MAX('Events Completion'[DateTime]);FILTER('Events Completion';'Events Completion'[user_id]=EARLIER('Events Completion'[user_id])))
Could someone help me out?
Solved! Go to Solution.
Try the following steps:
1) Calculate Max Date for each User ID
= CALCULATE(MAX(date), ALLEXCEPT(TableName,TableName[user_id]))
2) Use If statement to find subject title
=IF(MAX DATE = DATE,subject_title,NULL)
Try the following steps:
1) Calculate Max Date for each User ID
= CALCULATE(MAX(date), ALLEXCEPT(TableName,TableName[user_id]))
2) Use If statement to find subject title
=IF(MAX DATE = DATE,subject_title,NULL)
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
User | Count |
---|---|
114 | |
73 | |
64 | |
51 | |
49 |
User | Count |
---|---|
184 | |
104 | |
82 | |
79 | |
78 |