Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
jack95
Contributor II
Contributor II

Count levels of a dimension where a measure exceeds a certain value

Hi, I am currently quite new to Qlik sense and am having trouble with an expression I'm trying to calculate

I am working with a measure relating to average web page views, which looks something like this:

     sum({$<Event={'webpageview'},
                      Year={'2018'}>}
     ViewCount)

     /

     sum(
     {$<Year={'2018'}>}
     PageCount)

Hopefully you can see there that I am calculating the average page views by dividing the total page view events by the total number of pages

I have even saved this calculation as the variable AvgPageViews2018, and am able to run it using ${AvgPageViews2018}. Let's imagine that if I do so, the value of ${AvgPageViews2018} = 40

If I segment this measure by a dimension that I am using called 'CustomerID', it is successfully run for each Customer and returns a different value for each, let's say it looks something like this:

Capture.PNG

 

 

 

 

The issue I am having is with counting the number of Customers for whom the AvgPageViews2018 measure exceeds a certain value - for example I may want to count the number where AvgPageViews2018 is greater than 30, which in this example would be 4

How would I calculate the number of CustomerIDs where ${AvgPageViews2018} > 30, or even where ${AvgPageViews2018} is greater than the value of another variable?

Many thanks in advance for any help

Labels (1)
1 Reply
Romstar111
Contributor II
Contributor II

I am working on something similar in Qlik Sense with no luck.