Forum Discussion
User with max time logged for each ticket-key
Hi, i have a table similar to:
| Key | Worklog ID | Time Entry Logged Time | Time Entry User |
| key-1 | 0001 | 0.25 | A |
| key-1 | 0002 | 4 | A |
| key-1 | 0003 | 0.1 | B |
| key-2 | 0004 | 1 | C |
| key-2 | 0005 | 0.5 | C |
I need a column or measure that gives me the user who has logged the most time on a ticket-key. I.e. for "key-1" it should be "A" and for "key-2" it should be "C"
acnt_schartner
You can make a minor change to add SUM on Logged Time:Max Key = MAXX( TOPN( 1, ADDCOLUMNS( VALUES(Table5[Time Entry User]), "C", CALCULATE( SUM(Table5[Time Entry Logged Time])) ), [C],DESC ), Table5[Time Entry User] )
6 Replies
- Fowmy
Super User
acnt_schartner
Create a measure as follows:Max Key = MAXX( TOPN( 1, ADDCOLUMNS( VALUES(Table5[Time Entry User]), "C", CALCULATE( COUNT(Table5[Time Entry User])) ), [C],DESC ), Table5[Time Entry User] )- acnt_schartner
Helper III
Hi, i think this works in this case, but i do not see you using "Time Entry Logged Time" anywhere.
If i am thinking correctly "Count(Table5[Time Entry User]" just shows who created the most worklog entries per key. User "B" could have created more entries and have single entries with more logged time than "A". but "A" could have a bigger sum total of "Time Entry Logged Time" than user "B"
Key Worklog ID Time Entry Logged Time Time Entry User key-1 0001 0.25 A key-1 0002 4 A key-1 0003 4 A key-1 0004 0.1 B key-1 0005 0.1 B key-1 0006 5 B key-1 0007 0.1 B key-2 0008 1 C key-2 0009 0.5 C - Fowmy
Super User
acnt_schartner
Do you need the result by the count of users lines or the Logged Time total?
- AnonymousNot applicable
Hi acnt_schartner,
Did Fowmy 's suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements to find it more quickly.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng