Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Tags (3)
1 Solution

Accepted Solutions
kamal_sanguri
Valued Contributor

Re: Add a field based on another field

see this example..

5 Replies
consenit
Contributor II

Re: Add a field based on another field

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.

neetha_p
Honored Contributor

Re: Add a field based on another field

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
Valued Contributor

Re: Add a field based on another field

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

kamal

kamal_sanguri
Valued Contributor

Re: Add a field based on another field

see this example..

Re: Add a field based on another field

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

Community Browser