Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to add a filed that has a number for 'TimeReported' on a service desk ticket number.
My table looks like this.
Service Desk Ticket | Time Reported |
---|---|
25222 | .5 |
25222 | 4 |
29612 | 5 |
I want to add up Time Reported if the Service Desk Ticket number is the same, and only show one row instead of two separate rows.
Can I do this in the script or maybe an expression for the table?
any help is appreciated
Thank you,
Alam
see this example..
Hi There.
You need a Straight Table with the Ticked Number as dimension and the SUM() of the time values as an expression.
Kind Regards,
Ernesto.
Hi Alam,
try below code in script:
Data:
LOAD [Service Desk Ticket],
Max([Time Reported]) AS [Time Reported]
FROM Table
GROUP BY [Service Desk Ticket];
you don even need to change the script, use pivot table it will do it automatically for you.
kamal
see this example..
Hi,
If you need all the rows sum up if there is single Service Desk Ticket then try this way
T1:
LOAD * Inline
[
Service Desk Ticket, Time Reported
25222, .5
25222, 4
29612, 5
];
NoConcatenate
LOAD [Service Desk Ticket], sum([Time Reported]) as [Time Reported]
Resident T1 Group By [Service Desk Ticket];
DROP Table T1;
And in result you get the output as but question is what is the format of Time Reported here will it be minutes or what if values come in different format then you need to convert this field into minutes i guess.
Service Desk Ticket | Time Reported |
25222 | 4.5 |
29612 | 5 |
Regards
Anand