Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rolling 12 Months Count Distinct YearMonth

Hi Everyone,

Can you guide me how to make set analysis running 12 months count distinct yearmonth? I've tried using set analysis like in the below:

[MM] = Sum(Aggr(RangeSum(Above(Count({<Type2={'SHIPMENT', 'RET. SHIPMENT'}, DateId={"<=$(Today())"},$(='['&Concat({<$Table={'dCalendar'}, $Field-={'DateId'}>}DISTINCT $Field, ']=, [')&']=')>}DISTINCT MonthNameId) + Sum({<DateId=>}0), 0, RowNo())), ItemNo, (MonthNameId, (NUMERIC))))

The problem are:

1. Count cumulative for entire dimension MMM YYYY

2. When the dimension change into Week or Date, it has 0 value and also cumulative for entire Date dimension

The result what I want like in the below for each date dimension:
Month Year
Month Year.PNG
Year Week
Year Week.PNG
DateId
Date.PNG

Attached my .qvw file

Labels (1)
0 Replies