Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i need to show the line chart, which have two dimension, one is month, and other is itemtype,
i need to show the values of last 12 month according to selection.
the value which need to be show is the diffrence from last month,
for example,
for month=11/2014, i have to show the data of 2014/11-2014/10(diffrence of these month value)
month=10/2014, i have to show the data of 2014/10-2014/09(diffrence of these month value) respectivley.
For showing last 12 month i am using the formula:
sum({<yearmonth={'<=$(=max(yearmonth))>=$(=addmonths(max(yearmonth),-11))'}>}amount)
its giving me the values of last 12 month.
i already tried using above() function,
but when i use the second dimension in a line chart the value starts getting incorrect.
Its urgent.
with Regards
Harshita gaur
Hi,
Is your number of second dimension values fixed?
yes the va;lue is fixed i have total 7 type of items.
and i already tried making expression for every type.
but its giving me a problem, i can't select a type according to selection, every time all the six value appear.
You could try like this
RangeSum(sum({<yearmonth={'<=$(=max(yearmonth))>=$(=addmonths(max(yearmonth),-11))'}>}amount), Above(sum({<yearmonth={'<=$(=max(yearmonth))>=$(=addmonths(max(yearmonth),-11))'}>}amount), 7))
i tried using the above formula, i am getting the value of the latest month, not the difference from last month.
Seems like i misunderstood something. Could you please share sample file and describe required result
hi ,
I cant share the original file but i made a demo one, in this file, when i select a month from the list box it will generate the last 12 month of cost. In this example i find the actual amount of that month for the particular type, but i want to generate the difference from last month for that particular month .
Hi,
Try this expression
Rangesum(Above( sum({<month1= {'<=$(=AddMonths((Max(month1)),0)) >=$(=Addmonths((Max(month1)),-11)) '}>}cost)),
- sum({<month1= {'<=$(=AddMonths((Max(month1)),0)) >=$(=Addmonths((Max(month1)),-11)) '}>}cost))
Regards,
jagan.
Hi jagan,
Actually it's getting me the correct values, except for the first line.
But it will genrate the wrong values, when i use a line chart.
regards
Harshita Gaur