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: 
Not applicable

Cumulative count (out of selection) in qlikview chart expression

Hello,

I would like to count materials from the beginning (January 2010) even if I select ONLY year 2017.

In other words, if I select ONLY 2017’s month for my chart, I would like to have:

- For January 2017: Cumulative Count of materials From January 2010 To  January 2017.

- For February 2017: Cumulative Count of materials From January 2010 To  February 2017.

- For March 2017: Cumulative Count of materials From January 2010 To  March 2017.

PFA file for more details.

Thx in advance for your help.

Ricky.

1 Solution

Accepted Solutions
Sergey_Shuklin
Specialist
Specialist

Hello, Ricky!

For getting the value of selected date you can use this set analysis expression:

Count({<Month={"<=$(#=max(Month))"}>}Material)

This "$(#=max(Month))" will calculate the maximum of dates, and this "<=" will take only those which a lower or equal of max.

After that you can take a different steps for solving the task.

The first - use the "Accumulate" option on expression tab in the chart.

The second - use the rangesum function:

rangesum(Above(Count({<Month={"<=$(#=max(Month))"}>}Material),0,RowNo()))

Both of them will bring you to the result you needed.

Please, find the attachement and look at the screenshot below:

Is this what you want to achieve?

cumulate.png

View solution in original post

3 Replies
sunny_talwar

Please check the response here:

Cumulative count (out of selection) in qlikview chart expression

and try not to create duplicate threads

Sergey_Shuklin
Specialist
Specialist

Hello, Ricky!

For getting the value of selected date you can use this set analysis expression:

Count({<Month={"<=$(#=max(Month))"}>}Material)

This "$(#=max(Month))" will calculate the maximum of dates, and this "<=" will take only those which a lower or equal of max.

After that you can take a different steps for solving the task.

The first - use the "Accumulate" option on expression tab in the chart.

The second - use the rangesum function:

rangesum(Above(Count({<Month={"<=$(#=max(Month))"}>}Material),0,RowNo()))

Both of them will bring you to the result you needed.

Please, find the attachement and look at the screenshot below:

Is this what you want to achieve?

cumulate.png

Not applicable
Author

Thx Sergey,

It's OK for me.

Ricky.