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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
gal_polak
Creator
Creator

Accumulating count zero when selecting dates

Hi, 

I have a line chart that basically count the number of users i have on time line, with accumulating formula:

RangeSum(Above(Count({$<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation)>} Distinct UserID), 0, RowNo())) 

but when selecting dates in the chart, the numbers are dropping, 
i guess i understand way, 

but how can i prevent this? 

I would like to be able to filter the count with other dimensions but disregard the slicing of the time dimension in the line chart.

 

see attached video

Labels (3)
2 Solutions

Accepted Solutions
gal_polak
Creator
Creator
Author

So what you suggested didn't work. 

 

but it seems that this is working:

$(=
RangeSum(Above(
Count({$<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation),Date={'<$(=Min(Date))'}, [Week Start Date]=>} Distinct UserID)
,0,RowNo()))
)

+

RangeSum(Above(Count({$<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation)>} Distinct UserID), 0, RowNo()))

 

basically adding the accumulating count  up until the selected date. 

View solution in original post

sunny_talwar

If this is the route you want to go... why do you need RangeSum() in the first part of the expression... this should work too

$(=Count({$<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation),Date={'<$(=Min(Date))'}, [Week Start Date]=>} Distinct UserID)
)

+

RangeSum(Above(Count({$<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation)>} Distinct UserID), 0, RowNo()))

Having said that, the expression I provided should have worked as well... all you needed was to replace the field you are making selection/s in the first part of the expression.

View solution in original post

4 Replies
sunny_talwar

Try ignoring selection in Date field within the Count() function and then multiply with a dummy expression

RangeSum(Above(
  Count({$<DateField, RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation)>} Distinct UserID)
, 0, RowNo()))

*

Avg({<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation)>} 1)

 

gal_polak
Creator
Creator
Author

So what you suggested didn't work. 

 

but it seems that this is working:

$(=
RangeSum(Above(
Count({$<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation),Date={'<$(=Min(Date))'}, [Week Start Date]=>} Distinct UserID)
,0,RowNo()))
)

+

RangeSum(Above(Count({$<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation)>} Distinct UserID), 0, RowNo()))

 

basically adding the accumulating count  up until the selected date. 

sunny_talwar

If this is the route you want to go... why do you need RangeSum() in the first part of the expression... this should work too

$(=Count({$<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation),Date={'<$(=Min(Date))'}, [Week Start Date]=>} Distinct UserID)
)

+

RangeSum(Above(Count({$<RecordSource = {'UserCreated'}, $(=SetAnalysisPopulation)>} Distinct UserID), 0, RowNo()))

Having said that, the expression I provided should have worked as well... all you needed was to replace the field you are making selection/s in the first part of the expression.

gal_polak
Creator
Creator
Author

I guess you are right, 

also tested what you suggested, and it works the same.

 

thx!