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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
manu1512
Creator
Creator

Cumulative sum

Hi all,

 

I am using rangesum for the counting the expression in trend chart.

 

rangesum(above(Sum({<Equipment_isSMA_Upgrade_Eligible={1},Flag={2},MonthYear=,QuarterYear=>}if(EquipmentStartYear<= Year,EquipmentCount)),0,RowNo())))

 

but when i am selecting any year the values are getting changed ....which is not required by business.

 

Can anyone help me in finding the alternate solution for this?

 

 

1 Solution

Accepted Solutions
sunny_talwar


@manu1512 wrote:
No this happens when i dont select any year

Try this and see if this makes any difference

RangeSum(Above(
Sum({<Equipment_isSMA_Upgrade_Eligible = {1}, Flag = {2}, MonthYear, QuarterYear, Year>}
   If(EquipmentStartYear <= Year, EquipmentCount))
, 0, RowNo())))
*
Avg(1)

 

View solution in original post

11 Replies
Thiago_Justen_

What about this?

 

rangesum(above(Sum({<Equipment_isSMA_Upgrade_Eligible={1},Flag={2},MonthYear=,QuarterYear=,"EquipmentStartYear"={"<=Year"}>}EquipmentCount),0,RowNo())))

 

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
manu1512
Creator
Creator
Author

sorry its showing no data display

sunny_talwar

May be try this

RangeSum(Above(
Sum({<Equipment_isSMA_Upgrade_Eligible = {1}, Flag = {2}, MonthYear, QuarterYear, Year>}
If(EquipmentStartYear <= Year, EquipmentCount))
, 0, RowNo())))

or this

RangeSum(Above(
Sum({<Equipment_isSMA_Upgrade_Eligible = {1}, Flag = {2}, MonthYear, QuarterYear, Year>}
   If(EquipmentStartYear <= Year, EquipmentCount))
, 0, RowNo())))
*
Avg({<Equipment_isSMA_Upgrade_Eligible = {1}, Flag = {2}>} 1)
manu1512
Creator
Creator
Author

Thanks @sunny_talwar its worked second one but  now i am facing only one issue that  in x axis previously year was shown up to 2025 now it reduced to 2018

sunny_talwar

This happens when you select a 2018, right? You want to see all the years starting from the minimum year selected?
sunny_talwar

You can try this

RangeSum(Above(
Sum({<Equipment_isSMA_Upgrade_Eligible = {1}, Flag = {2}, MonthYear, QuarterYear, Year>}
   If(EquipmentStartYear <= Year, EquipmentCount))
, 0, RowNo())))
*
Avg({<Equipment_isSMA_Upgrade_Eligible = {1}, Flag = {2}, MonthYear, QuarterYear, Year = {"$(='<=' & Min(Year))"}>} 1)
manu1512
Creator
Creator
Author

Hello @sunny_talwar

 

Many thanks for help but unfortunately it is showing no data to display 😞 😞 

manu1512
Creator
Creator
Author

No this happens when i dont select any year
sunny_talwar


@manu1512 wrote:
No this happens when i dont select any year

Try this and see if this makes any difference

RangeSum(Above(
Sum({<Equipment_isSMA_Upgrade_Eligible = {1}, Flag = {2}, MonthYear, QuarterYear, Year>}
   If(EquipmentStartYear <= Year, EquipmentCount))
, 0, RowNo())))
*
Avg(1)