Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys
Here attached the data . each ticket has many Action and each Action has an actor and the ActionTime is the time when the Actor made the Action
How can i figure out the last action made for each ticket and the actor of this action ? i mean basing on the field ActionTime.
and would like to store them in other in column LastAction and LastActor
for example for the ticket ER:485506
lastAction is: TR
lastActor is: FR_EUR
Hi,
one solution to do this is using FirstSortedValue(), like attached below
youssefbelloum and stevedark guys could you please take a look for this
Hi,
one solution to do this is using FirstSortedValue(), like attached below
thanks youssefbelloum . could you more explaine please i still newest in qlik. did you attached somethings?
Hi Mohammed,
You need to view the thread directly, rather than in your notifications to see attachments. Just click the discussion topic to do this.
I would typically approach this in the load script, with a group by and a where exists, but FirstSortedValue could do the trick.
Steve
thanks youssefbelloum
stevedark thanks so much
You're welcome
youssefbelloum is it possible to know just which ACTOR have made the last Action is it CAP or ESSILOR?. using the same function
for example :
for the ticket ER:485832 last Action is made by CAP
for the ticket ER:485891 last Action is made by ESSILOR even if there is an Action after the one made by ESSILOR
I mean i want to just to take in consideration the two values CAP or ESSILOR, which one have made the last Action
this is my script but it is not working for ER:1342684
temp1:
load Ticket,ActionTime,Actor
resident FactTicketActivity;
left join(temp1)
load Ticket,
FirstSortedValue(Actor,ActionTime) as lastActorOrganization
Resident temp1 Where Actor='ESSILOR' OR ActorOrganization ='CAP' Group By Ticket;
left join(FactTicketActivity)
loadTicket,lastActorOrganization
Resident temp1;
drop table temp1;
i would be so thankfull youssefbelloum if you take a look
@
Reading this:
for the ticket ER:485832 last Action is made by CAP
for the ticket ER:485891 last Action is made by ESSILOR even if there is an Action after the one made by ESSILOR
in the ticket: ER:485891 the last value depending on the ActionTime field is CAP and not ESSILOR..
is there some exceptions ??