Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort and number dates by customer

I need sort dates and number by Cu_Id like Tr_Id, then use it for count days between the dates for the same Cu_id and add the number as a new column then view

- Average by Cu_Id

The new table should look like this.

Cu_IdTr_IdDateDate - Above(Date)Sum by Cu_IdAverage by Cu_Id
1234103/12/200600
1234218/12/20061515
1234305/01/20071833
1234409/01/20074379
2345110/03/200900
2345212/04/20093333
2345306/05/2009245719


Tks!

4 Replies
Not applicable
Author

Hi Shariel,

the part "Sum by Cu_Id" is finished.

For the second part "Average" I have no idea yet.

Rainer

Not applicable
Author

Hi Shariel,

here are the table you want to have.

Happy qlicking!

Rainer

Not applicable
Author

Thanks Rainer! it´s just i need, but one more question, i have two tables without the number "Tr_Id" how can i generate it or sort by client?

Regards!

Not applicable
Author

Shariel,

this is the only part in our script we used the field "Tr_Id". Instead of "Tr_Id" try to count the field "Date".

CountTrId:
Load
Cu_Id,
Count(Tr_Id) as CountedTrId
Resident RealData
Group By Cu_Id

Ia´m not sure if I understand your question correctly.

If possible prepare a short example of the tables you have.

So I and the other colleagues are able to thing about a solution.

Rainer