Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikcheepirishe
Creator
Creator

Rangesum expression logic

chart.PNG

I have a bar chart 

from date 25 it has 2000 value it bas been added to 26th and 25th,26th data is added to the 27 so ...on now on next month the same process is not getting so what will be the expression to achieve if 1dec has value 500 it should show 500 then in 2nd dec it has 1000 it should show 1500 likewise

below is my expression used in chart

sum(DISTINCT aggr(rangesum(above(TOTAL sum(NET_WEIGHT),0, Rowno())),MONTH_EXCISE_INVOICE_DATE,EXCISE_INVOICE_DATE))

6 Replies
rubenmarin

Hi Manesh, maybe removing the 'Distinct' clause?

Which value is returning now and which value is expected for 1st and 2nd of the month?

sunny_talwar

May remove the TOTAL keyword and see if that helps...

Sum(DISTINCT Aggr(RangeSum(Above(Sum(NET_WEIGHT), 0, RowNo())), MONTH_EXCISE_INVOICE_DATE, EXCISE_INVOICE_DATE))

qlikcheepirishe
Creator
Creator
Author

Implemented both of your suggestion not working anything else???

qlikcheepirishe
Creator
Creator
Author

1st month values what is actually required and I m getting

for 2nd month the expression is required from your expertise...

qlikcheepirishe
Creator
Creator
Author

omarbensalem‌ any idea for the requirement.

MarcoWedel

Hi,

maybe you could try with full accumulation of the chart expression.

In order to restart the accumulation per month you might use the month field as second dimension, stack the second dimension (as one date cannot belong to two months there will only ever be one segment per stack), restrict to a common color and turn off the legend. The result could look like this:

QlikCommunity_Thread_284786_Pic1.JPG

QlikCommunity_Thread_284786_Pic2.JPG

QlikCommunity_Thread_284786_Pic3.JPG

QlikCommunity_Thread_284786_Pic4.JPG

QlikCommunity_Thread_284786_Pic5.JPG

QlikCommunity_Thread_284786_Pic6.JPG

LOAD *,

    MonthName(EXCISE_INVOICE_DATE) as MONTH_EXCISE_INVOICE_DATE

INLINE [

    EXCISE_INVOICE_DATE, NET_WEIGHT

    25/08/2017, 2000

    26/08/2017, 4730

    27/08/2017, 773

    28/08/2017, 3770

    29/08/2017, 2318

    30/08/2017, 1261

    31/08/2017, 1025

    01/09/2017, 2000

    02/09/2017, 5307

    03/09/2017, 2520

];

hope this helps

regards

Marco