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
Hi,
Use this expression
=Avg(SALARY) + Alt(Above( TOTAL Avg(SALARY),),0)
Regards,
jagan.
Thanks a lot mr anbu.....i got the solution as expected ...........can you please explain about the alt function ...what it does actually ...i am not familier with this function ....
Sarfaraz
Thanks to all ..........I got the solution ...but what is alt functin ....what are its functionality request with all you guys to explain me in brief....
Sarfaraz
Hi sarfaraz,
could you please post the solution as I was also trying the same but could not achieve it. I am using personal edition.
Thanks
From QV help
The alt function returns the first of the parameters that has a valid number representation. If no such match is found, the last parameter will be returned. Any number of parameters can be used.
Alt(Above( TOTAL Avg(SALARY),),0) -- In case of first row, Above() returns null. So Alt(Above(),0) returns last parameter 0.
alt(sales,0) it ignore null values
alt(date(date#(datefield,mm/dd/yyyy)),date(date#(datefield,mm-dd-yyyy))
it returns the correct date among this
extract from help:
The alt function returns the first of the parameters that has a valid number representation. If no such match is
found, the last parameter will be returned. Any number of parameters can be used.
Example:
alt( date#( dat , 'YYYY/MM/DD' ),
date#( dat , 'MM/DD/YYYY' ),
date#( dat , 'MM/DD/YY' ),
'No valid date' )
Hi Pooja,
Please check the above attched QVW file given by anbu cheliyan.........That will clear your doubts...
Sarfaraz
I can not open qvw created by other user.
could you please attach it as image so that i can also understand how this requirement achieved.
or if it achieved by any set expression could you please copy that set expression in this thread.
Thanks
Dear Pooja,
please have the look on attached image.......
Sarfaraz