Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody !
I use Qliksense since this year, and i like this software, but i encounter difficulties.
I want to count my contract stock, month per month, but its difficult...
I have a database which contains contract with 2 dates :
Examples :
contract effect end
100 21/06/2020 25/12/2020
101 15/10/2020 30/03/2021
...
I count my stock month per month as follow :
count({<year=, month=, effect={"<=$(=Date(max([ActifDate])))"},end={">$(=Date(max([ActifDate])))"}>} distinct contract)
with :
Year(%Date) as year
Month(%Date) as month
if(num(%Date)<num(Today()), %Date) as ActifDate
The principle is simple: I count contract references, which must have 2 dates that meet the conditions in the count. I want this calculation for each month end of the year.
The problem is that it tells me the number of contracts per month corresponding to the definition, but broken down by month and year, instead of calculating me this number on the given date. I don't know how to tell the difference?
I don't know if i am clear ?
Thanks to your help !
For that you need to generate those data points for each month.
Below function will help you do that.
can you share the sample input & expected output