Forum Discussion
Logged Time to Average Time
- 6 years ago
acnt_schartner
I got the results, please check and accept if it works for you.
Add the following measures;Total = SUM(Worklogs[Time_Logged])Avg = VAR L = SELECTEDVALUE(Labels[Ticket_Label]) VAR T = SUMX( FILTER(ALL(Worklogs),RELATED(Labels[Ticket_Label])=L), Worklogs[Time_Logged] ) VAR DT = CALCULATE(DISTINCTCOUNT(Worklogs[Ticket_Key]),FILTER(ALL(Worklogs),RELATED(Labels[Ticket_Label])=L)) RETURN DIVIDE(T,DT)Time Logged vs Avg = DIVIDE( [Total], [Avg] )________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
acnt_schartner
In my example I set it as On-to-many based on your initial question and explanation.
One option is to set your relationship to On-to-many or you can tell me where you have a Table wtih unique Ticket Key?
Creating a Unique Ticket Key dimention is another way.
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
Hi,
I managed to find a solution:
I just imported the Ticket_Labels into the Worklogs-Table. This only works because the Tickets i am interessted in only have one label. This solution wouldn't work if more labels for each ticket where needed.
I just created a new column (in DAX):
Ticket_Label =LOOKUPVALUE(Labels[Ticket_Label],Labels[Ticket_Key],Worklogs[Ticket_Key],BLANK())
After that i could just adjust your messure to only use the Worklogs_Table.