Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have table
|Contractid|StartDate|Endate|Duration|EndYearMonth|YYYYMM|
|1 | 2022-01-01| 2022-07-30 | 6 | 202207 | 202201 |
|1 | 2022-01-01| 2022-07-30 | 6 | 202207 | 202202 |
...
|1 | 2022-01-01| 2022-07-30 | 6 | 202207 | 202207 |
i want to make line graph that shows how many contracts that started 6 month ago ended on each month.
So example Contract would give count 0 on months 202201-202206 and 1 on 202207
I have tried with
Count({<[Duration]={'6'}, EndYearMonth={'YYYYMM'}>} DISTINCT ContractID)
But it does not work.
Hello,
Can you try with this:
sum(aggr(rangesum(above(count(distinct ContractID),0,6)),[YYYYMM]))
Not correct. Should be 0 allway until 202207 and then 1
Same with the rangesum? the rangecount was an error
Is your dimension in your chart YYYYMM? If not, you need to replace it with the dimension you are using.
Try this
Count({<EndYearMonth = {"=Date(AddMonths(Date#(YYYYMM, 'YYYYMM'), [Duration]) = EndYearMonth)"}>} DISTINCT ContractID)