Skip to main content
Announcements
Qlik Launches Open Lakehouse and advanced agentic AI experience in Qlik Answers! | LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
HamJan
Contributor II

How to calculate active contracts per month

Hi. I have qlik table

|ContractId|startdate|enddate|

What is the most effective way to get line- or barchart that displays count of customerid:s per yyyymm. So if customer has start date 1.1.2025 and end date 31.12.2025 it would show count 1 on every month of 2025 (202501-202512)?

I know i could get it by mapping if contract is active for each month but that would make my data 24 times Bigger on average. And i would like to avoid that.

Labels (7)
1 Solution

Accepted Solutions
HamJan
Contributor II
Author

I mapped every contract for each month it is active to get result

View solution in original post

3 Replies
sbaro_bd
Creator III

Hi,

Can you provide imputs like a sample data ? What results did you get and what do you expect?

Regards.

marcus_sommer

The classical approach of resolving the from-to area to dedicated values per an intervalmatch-logic respectively internal load-loops per while-statement is the most efficient way to get the needed sub-set of data.

The storage-logic of Qlik isn't linear and therefor the entire data-set won't increase n times. Within a well-designed data-model the more on size may nearly not noticeable. 

HamJan
Contributor II
Author

I mapped every contract for each month it is active to get result