Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to calculate like below
Year Month Average Salary Previous Salary + Average Salary
2010 Jan 15000 15000
2010 Feb 20000 35000
2010 March 16000 36000
like this
I reached till average salary ......but what function i should have to used for Previous + average ....I am calculating this in chart Expression I used Last() function as well .....but did not work..
Help in this regards
Sarfaraz Sheikh
Check this app
Use
Load Year,month,Average_Salary,RangeSum(previous(Avergae_Salary),Average Salary) as Tota_Sal
Resident Table_Name
Group By Year,Month,Average_Salary.
Thanks
Chaitanya
Please use the expression sum(AverageSal)
and Enable the below option
Accumulation: Accumulate 2 steps back
Hi,
Or in load script try some thing this ways
A:
LOAD Year, Month, [Average Salary];
LOAD * INLINE [
Year, Month, Average Salary
2010, Jan, 15000
2010, Feb, 20000
2010, March, 16000
2010,Apr,15000
];
NoConcatenate
New:
LOAD Year, Month,[Average Salary],
if(Year = previous(Year),Previous([Average Salary]) + [Average Salary], [Average Salary]) as Total
Resident A;
DROP Table A;
And final op
Regards
Anand
Hi vasu,
I tried with the Accumulate ....but not working getting 0 in every row ...
Sarfaraz
i thinki u can use in chart level like
total =avg salary+above(sum(avgsalary),1)
Hi Anand,
You Manually Entered the Average salary in your case ........But in my case i am finding it using Average function ...So i tried with average function in my script but it is not working .......
request you to tell me another logic ........
Is it possible to use any relevent fuction in Chart Expression for achieve the same .......
Sarfaraz
Check this app
Hi anbu,
Thanks for your help ...but not getting as expected output ...please check the below attached Qvw file..
Sarfaraz
Check this app