Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Micki
Creator
Creator

Catch value from previous week (cumulative measure) and use it in KPI

Hi guys, i have a cumulative measure

Week Start DateOpen items
2019-09-300
2019-10-072
2020-01-064
2020-01-136
2020-01-207
2020-02-038
2020-02-1012
2020-02-1721
2020-02-2428
2020-03-0233
2020-03-0934
2020-03-1636
2020-03-2340
2020-03-3042
2020-04-0646
2020-04-1354
2020-04-2758
2020-05-0463
2020-05-1167
2020-05-1875
2020-05-2583
2020-06-0187
2020-06-0889
2020-06-1593
2020-06-2299
2020-06-29104
2020-07-06111
2020-07-13117
2020-07-20121
2020-07-27123
2020-08-03125
2020-08-10132
2020-08-17137
2020-08-24142
2020-08-31144
2020-09-07151
2020-09-14155
2020-09-21169
2020-09-28181
2020-10-05189
2020-10-12212
2020-10-19219

 

Dimension: 

 

 

 

 

WEEKSTART([Date])

 

 

 

 

Measure: 

 

 

 

 

RangeSum(Above(TOTAL COUNT({<Status={'New', 'Active'}, [WorkItemType]={'Bug'}>}DISTINCT [%ID]), 1, RowNo(TOTAL)))

 

 

 

 

 

And it's working in table, but i need to catch value from previous week like: 2020-10-12 212, 

and compare with current: 2020-10-19 219,  and that comparison should be in KPI, so when i don't have week start dimension cumulative measure stop working and I don't know how to do it 😞

To summarize: my expected result should be two measures: one current which i have, and one from previous (cumulative measure) . Thank you in advance.

@sunny_talwar 

 

Please Note, i am mostly interested how to do it in FrontEnd, right now i did it in BackEnd

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

@Micki This should be easy to do using set analysis. May be this for 2020-10-19

 

Count({<Status = {'New', 'Active'}, [WorkItemType] = {'Bug'}, Date = {"<=$(=Date(Max(Date)))"}>} DISTINCT [%ID])

 

and this for 2020-10-12

 

Count({<Status = {'New', 'Active'}, [WorkItemType] = {'Bug'}, Date = {"<=$(=Date(WeekStart(Max(Date), -1)))"}>} DISTINCT [%ID])

 

 

View solution in original post

2 Replies
sunny_talwar

@Micki This should be easy to do using set analysis. May be this for 2020-10-19

 

Count({<Status = {'New', 'Active'}, [WorkItemType] = {'Bug'}, Date = {"<=$(=Date(Max(Date)))"}>} DISTINCT [%ID])

 

and this for 2020-10-12

 

Count({<Status = {'New', 'Active'}, [WorkItemType] = {'Bug'}, Date = {"<=$(=Date(WeekStart(Max(Date), -1)))"}>} DISTINCT [%ID])

 

 

Micki
Creator
Creator
Author

@sunny_talwar , OMG you change my mind how qlik is working :), thank you so much, never thought it can working in that way, i just made minor change for 2020-10-12:

Date(WeekStart(Max(Date), 2)