Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Accumulation up to today in chart

Hi,

I created a chart with several expression, two of which allow me to accumulate the data.

The problem is that these functions continue the accumulation also in the future.. as you can see from the screenshot i have highlighted in red the part of the chart that I do not want to be seeing as it is misleading ( basically i don't show the data of future sales)

dimension:

= month(DTA_MAKEDATE)

exp ( 1 for 2013 and 1 for 2014):

=(rangesum( above( sum({<PDT_DTA_Anno={'$(=YearName(today()))'}>}PDT_DBL_RN),0,12) ))

How can i fix this? the accumulation funcion of charts does the same thing.

Tx in advance

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

i think you can handle this through some color techniques.

On the expression tab , expand the expression properties by hitting the '+' sign.  On the background color you can enter a color condition to evaluate if the month is <= or > then the current month.  Use the ARGB() color function to assign a transparent color if its in the future.

for example , the following assigns grey color for months <=9 and invisible for months > 9.  You would not hard code the number , but perhaps  use something dynamice like  month(Today()) or  month (max(Date)) in its place

if (Month  <= 9 , rgb(125,125,125), ARGB(0,125,125,125))

it will still calculate but the lines in the future will not be visible to the user.

attached i added a dynamic example showing the technique

View solution in original post

1 Reply
JonnyPoole
Employee
Employee

i think you can handle this through some color techniques.

On the expression tab , expand the expression properties by hitting the '+' sign.  On the background color you can enter a color condition to evaluate if the month is <= or > then the current month.  Use the ARGB() color function to assign a transparent color if its in the future.

for example , the following assigns grey color for months <=9 and invisible for months > 9.  You would not hard code the number , but perhaps  use something dynamice like  month(Today()) or  month (max(Date)) in its place

if (Month  <= 9 , rgb(125,125,125), ARGB(0,125,125,125))

it will still calculate but the lines in the future will not be visible to the user.

attached i added a dynamic example showing the technique