Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

RangeSum not working as intended in BAR chart.

Hello,

I am fairly new to Qlikview. I have a bar graph with two dimensions (Demand Type and YYYYQ) and one measure on which I am doing a rangesum.

RANGESUM(BELOW(SUM({$<Datatype={'MPDemandsCRSD'}>}BACKLOG_UNIT_QTY),0,RowNo()))

bar.jpg

But the rangesum is not working as intended, can you tell me what is missing? As you can see the green portion of the bar should stack up all the way till the last quarter shown (20191) and so is the case with the blue portion of the bar (backlog). It works perfectly in a pivot table.


pivot.jpg


Thanks in advance.

9 Replies
sunny_talwar

Try this

Aggr(RangeSum(Above(Sum({$<Datatype={'MPDemandsCRSD'}>}BACKLOG_UNIT_QTY), 0, RowNo())), DEMAND_TYPE, YYYYQ)

Anonymous
Not applicable
Author

Thanks for the quick response and I did try this before I posted and sadly it does not work.

sunny_talwar

It might help to know what makes you think it is not working.... numbers are wrong... you see nothing (blank chart).... computer shuts down ....

Anonymous
Not applicable
Author

The numbers are wrong and the accumulation is not happening by the demand type.

bar.jpg

sunny_talwar

How about this

Aggr(RangeSum(Above(Sum({$<Datatype={'MPDemandsCRSD'}>}BACKLOG_UNIT_QTY) + Sum({1} 0), 0, RowNo())), DEMAND_TYPE, YYYYQ)

Anonymous
Not applicable
Author

Thanks for your quick response Sunny but this had a syntax error and would not work.

The error was here right after the RowNo()))

Aggr(RANGESUM(Above(SUM({$<Datatype={'MPDemandsCRSD'}>}BACKLOG_UNIT_QTY),+Sum({1}0),0,RowNo())) ,DEMAND_TYPE,YYYYQ)/$(vMetricsSelector)

sunny_talwar

Did you accidentally add a comma here?

Capture.PNG

Anonymous
Not applicable
Author

I fixed the typo and this is what I see. The first quarter always is correct and it matches the same pivot table below. Also interestingly if i did a fast change on this bar graph to pivot the values are correct. Only the chart is way off.

bar.jpg

Here is the pivot on the fast change for the same graph:

pivot.jpg

Digvijay_Singh

Works this way with the sample attached -

Capture.PNG