Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add a field based on another field

  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 TicketTime Reported
25222.5
252224
296125

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

1 Solution

Accepted Solutions
kamal_sanguri
Specialist
Specialist

see this example..

View solution in original post

5 Replies
consenit
Partner - Creator II
Partner - Creator II

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.

Anonymous
Not applicable
Author

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];

kamal_sanguri
Specialist
Specialist

you don even need to change the script, use pivot table it will do it automatically for you.

kamal

kamal_sanguri
Specialist
Specialist

see this example..

its_anandrjs

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 TicketTime Reported
252224.5
296125

Regards

Anand