Qlik Sense - Displaying data by time series aggregated by a given time period
<p>I have data in the following format in Qlik Sense:</p>

<pre>
Date       Customer Flag
2016-10-01   A       1
2016-10-01   B       0
2016-10-02   A       1
2016-10-02   C       1
2016-10-03   A       1
2016-10-03   B       1
2016-10-03   C       1
2016-10-05   C       1
2016-10-10   A       0
2016-10-10   B       1
2016-10-11   C       0
</pre>

<p>I would like to display this data in a table in Qlik Sense in the following format:</p>

<pre>
#Week     Count Distinct Customer Where Flag is 1
39           2
40           3
41           3
</pre>

<p><strong>Logic Behind</strong>: I need Week wise count of DISTINCT Customers who have Flag = 1 in the that Week including one previous Week. So, here Week Number 40 will display distinct count for Week 39 and 40. Similarly Week 41 will display distinct count for Week 40 and 41 and so on.</p>

<p>I would appreciate if anyone can suggest a Qlik Sense expression for the above?</p>