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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
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