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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Jisuar
Contributor
Contributor

Accumulating count with 2 dimensions

I have the following scenario:

Dimension 1: Month

Dimension 2: Year

Accumulate "Count(Policies)" by Month AND Year

i have it in QV, however i dont know how to do it in QS.

the result should look like Fig.2

fig 1. With No Accum

No Accum.JPG

Fig.2: Result accumulated

Accum.JPG

thanks.

 

 

1 Solution

Accepted Solutions
Channa
Specialist III
Specialist III

can you remove year and put this in 2 measure

pre year

RangeSum(Above(Sum({<CGL_Year={$(=Year(Today())-1)}>}[Processed Policies]), 0, RowNo(TOTAL)))

 

cur year

=aggr(RangeSum(above(Sum({<CGL_Year={$(=Year(Today()))}>}[Processed Policies]),0,RowNo())),CGL_Month)

 

this is working find the attach second sheet

Channa

View solution in original post

7 Replies
Channa
Specialist III
Specialist III

RangeSum(Above(Sum(Sales), 0, RowNo()))

 

instead of sales use ur QV Expression

Channa
Jisuar
Contributor
Contributor
Author

Thanks Channa,

however it didnt work.

following the base graph and accum result using your formula.

as you can see... year 2 line (red) is accumulating year 1 and year 2 in base graph.... the expected result should be:

year 1 line: 21, (21+11), (21+11+12), etc...

year 2 line: 5, (5+5), (5+5+5), etc..

any suggesgion?

thanks,

Fig.1 BASE

BASE GraphBASE Graph

Fig. 2 Result

Result Accum with your formulaResult Accum with your formula

Channa
Specialist III
Specialist III

=RangeSum(Above(Sum(CUSTOMS_VALUE_QAR), 0, RowNo(TOTAL)))

try it works for me

Channa
Jisuar
Contributor
Contributor
Author

uhmm!! noup. same result using:

Processed Policies = RangeSum(Above(Count([Número ACE]), 0, RowNo(TOTAL)))

here is the Data Table of the Line chart... could be something related to sorting?? as you can see Month is the first sort criteria, then Year.

Data AccumData Accum

 

Thanks,

Jisuar
Contributor
Contributor
Author

Sharing QS app...

thanks,

 

Channa
Specialist III
Specialist III

can you remove year and put this in 2 measure

pre year

RangeSum(Above(Sum({<CGL_Year={$(=Year(Today())-1)}>}[Processed Policies]), 0, RowNo(TOTAL)))

 

cur year

=aggr(RangeSum(above(Sum({<CGL_Year={$(=Year(Today()))}>}[Processed Policies]),0,RowNo())),CGL_Month)

 

this is working find the attach second sheet

Channa
Jisuar
Contributor
Contributor
Author

thanks!! it works