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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the accumulation numbers

Hi,

I have the following table:

OrderId StartDate EndDate

1 2010-1-1 2010-2-1

1 2010-2-3 2010-3-1

2 2010-1-1 2010-5-1

The orderId is allowed duplicate because the valid date range is different.

Now I want to get the following forms and use pivot to show.

OrderId Min StartDate Month Count

1 2010-1 2

2 2010-1 1

How to achieve it?

3 Replies
Not applicable
Author

Straight table like this:

orderid date(min(startdate),'YYYY-MM') count(enddate)

Not applicable
Author

Thanks for your reply.

If I don't want to show the OrderId,

The results like this

Min StartDate Month Count

2010-1 3

If the min month is the same, I want to merge them into one month, and also show the total count in the count column.

Is it possible?

Thanks.

Not applicable
Author

I don't know if I good understand... but perhaps that...

Sample table: dimension date(min(datestart),'YYYY-MM')

expression count(enddate)...