Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

delbooth
New Contributor II

Count number of distinct routes

Hi .

I am trying to count the number of district routes for a given time ie current year and previous week.  I have tried the below where ColYear is master calendar data element and route is the field routes are located in.

count(distinct(if(ColYear={"$(=year(Today()))"},ColWeek = {"$(=Week(Today())-1)"},Route)))

Thanks

Del

2 Replies
agigliotti
Honored Contributor II

Re: Count number of distinct routes

maybe this:

count( {< ColYear={"$(=year(Today()))"},ColWeek = {"$(=Week(Today())-1)"} >} DISTINCT Route)

delbooth
New Contributor II

Re: Count number of distinct routes

Thanks

Community Browser