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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
SDT
Creator
Creator

RangeCount Distinct? Not possible in Qlik Sense?

I have data that includes the fields

  1. OrderNumber
  2. InvoiceDate
  3. ProductID

I created a chart using WeekEnd(InvoiceDate) as the dimension and Count(Distinct ProductID) as the measure to see how many unique products are sold per week. Simple.

Now I want to know how many unique products were invoiced in a 12 week rolling period and report that each week. Essentially on the same chart add the unique count of products for the prior 12 weeks.

I have tried various rangecount, aggr, etc and cannot get it working. If only Rangecount had a distinct option.

Does any one have a suggestion on how to prepare that visual?

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

I use Henric's The-As-Of-Table  for rolling period calculations.  Your weekly count would be something like Count({<DayDiff={"<7"}>} Distinct ProductID) and the rolling 12 count would be Count({<DayDiff={"<84"}>}Distinct ProductID)

View solution in original post

1 Reply
jwjackso
Specialist III
Specialist III

I use Henric's The-As-Of-Table  for rolling period calculations.  Your weekly count would be something like Count({<DayDiff={"<7"}>} Distinct ProductID) and the rolling 12 count would be Count({<DayDiff={"<84"}>}Distinct ProductID)