Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a year field which contains 100years(1915 to 2015) of data. if I select one year like 2013 it has to show the count(Contracts) for 2013,2012,2011,2010(ie last 4years of selected year) in line chart with cumulative totals.(ie 2013 shows sum(contracts ) from 1915 to 2013 and 2012 shows sum(contracts) from 1915 to 2012,...).
Thanks in advance
Best Regards
Anusha K
How to display selected year and last 3 years of selected year data in line chart
Here year is a dimension for line chart and count(contracts) is expression
Anusha,
Can you attach a sample application after reducing the data.
Thanks
BKC
I was gonna ask the same thing ![]()
Hi,
You can try this expression
Count({<Year={'>$(=max(Year)-3)<=$(=max(Year))'}>}Contracts)
Regards,
Greeshma
If the accumulate function on the expression tab doesnt work for you you may nee to use the rangesum,above and rowno functions thus
rangesum(above(count(contracts),0,rowno()))
this should accumulate for you. Ill send an example shortly
In the example attached, above is used to look at previous records. the format for the whole statement is
rangesum(above(aggregate(data), to how many rows above 0 = current row, how many rows back to start from which is given by rowno() which takes the accumulation back to the first row))
@ !Hi Team,
Sorry for my late response.
Please check the below file.In this The expression shows all the years cumulative totals .when i select on year filter it has to show last 3 years cumulative totals data like if i select 2014 it has to show 2014, 2013,2012 with cumulative totals.In line chart like 2014-500,2013-350,2012-220
Please help me to fild solution for this it is an urgent requirement in my project.
Thanks in advance
Best Regards
Anusha k