Can @Prior or something similiar be used in a fix statement in this way?

Hi,
I have a substitution variable 'currmonth' set to 'may'. In my calc on my fix I use: Fix (jan:&currmonth), but then I need to fix on 'currmonth' minus 1 month so 'apr' like Fix (jan:apr). However each month the 'apr' part will increase by one as 'currmonth' increases by one month. Thus I can't hardcode in 'apr'. So when I run next month and 'currmonth' = 'jun' it will run my second fix for 'may'.
&CurrMonth = May
Fix(Jan:&CurrMonth) - Works Correctly
I can't get this to work:
Fix(Jan:@Prior(&CurrMonth))
Anyone know a way to resolve this without having to go create a bunch more sub vars?
Thanks

I did this with subvars:
Fix ( @Levmbrs("Small Pwr Prd-NW.CO",0), "Current Forecast", "Working") /* Main Fix */
/* Declare local variables and reset to zero. Will be re-used throughout calc */
var Cumulative_Amount =0;
var Average_Amount =0;
/* Calculate the previous 24 months average for the desired account/location combinations */
Fix ("Small Renewable Energy Expense")
"Value" (
IF (@ISMBR(&CurrentYear) AND @ISMBR(&CurrYrStartMonth))
/* Set the local variables to store the correct values for previous 24 months */
Cumulative_Amount = @Sumrange("Small Renewable Energy Expense"->"Actual"->"Final" ,@XRANGE(&PriorYear1->&CurrYrStartMonth, &PriorYear1->Dec)) +
@Sumrange("Small Renewable Energy Expense"->"Actual"->"Final" ,@XRANGE(&PriorYear->Jan, &PriorYear->Dec)) +
@Sumrange("Small Renewable Energy Expense"->"Actual"->"Final" ,@XRANGE(&CurrentYear->Jan, &CurrentYear->&PriorMo));
Average_Amount = Cumulative_Amount / 24;
/* In the Current Month and Year set the value equal to the Average_Amount local variable */
"Small Renewable Energy Expense" = Average_Amount;
/* Now for the Current Year and the Next Month to end of year, set the value equal to the Average_Amount local variable */
ELSEIF (@ISMBR(&CurrentYear) AND @ISMBR(&CurrYrNextMonth:Dec))
"Small Renewable Energy Expense" = Average_Amount;
/* For the full next year, set the value equal to the Average_Amount local variable */
ELSEIF (@ISMBR(&NextYear) AND @ISMBR(Jan:Dec))
"Small Renewable Energy Expense" = Average_Amount;
/* Now for the last year, set the value equal to the Average_Amount local variable */
ELSEIF (@ISMBR(&NextYear1) AND @ISMBR(Jan:&NextYr1EndMonth))
"Small Renewable Energy Expense" = Average_Amount;
ENDIF )
Endfix
Fix ("Small Renewable Energy")
"Value" (
IF (@ISMBR(&CurrentYear) AND @ISMBR(&CurrYrStartMonth))
/* Set the local variables to store the correct values for previous 24 months */
Cumulative_Amount = @Sumrange("Small Renewable Energy"->"Actual"->"Final" ,@XRANGE(&PriorYear1->&CurrYrStartMonth, &PriorYear1->Dec)) +
@Sumrange("Small Renewable Energy"->"Actual"->"Final" ,@XRANGE(&PriorYear->Jan, &PriorYear->Dec)) +
@Sumrange("Small Renewable Energy"->"Actual"->"Final" ,@XRANGE(&CurrentYear->Jan, &CurrentYear->&PriorMo));
Average_Amount = Cumulative_Amount / 24;
/* In the Current Month and Year set the value equal to the Average_Amount local variable */
"Small Renewable Energy" = Average_Amount;
/* Now for the Current Year and the Next Month to end of year, set the value equal to the Average_Amount local variable */
ELSEIF (@ISMBR(&CurrentYear) AND @ISMBR(&CurrYrNextMonth:Dec))
"Small Renewable Energy" = Average_Amount;
/* For the full next year, set the value equal to the Average_Amount local variable */
ELSEIF (@ISMBR(&NextYear) AND @ISMBR(Jan:Dec))
"Small Renewable Energy" = Average_Amount;
/* Now for the last year, set the value equal to the Average_Amount local variable */
ELSEIF (@ISMBR(&NextYear1) AND @ISMBR(Jan:&NextYr1EndMonth))
"Small Renewable Energy" = Average_Amount;
ENDIF )
Endfix
Endfix /* End Main Fix */

Similar Messages

  • Does anybody else use "Nonbreaking Space (Fixed Width)" for this?

    Does anyone else do this?
    Does anybody else use "Nonbreaking Space (Fixed Width)" for this?
    I add special "white spaces" of an unchanging width:
    Is there an easier way to "automate" this?  The way I do it is horrible ...  horribly bad

    I don't think you can automate exactly that, but you might be able to get spacing you like better in general if you reduce the word spacing range and increase the letter spacing range in your justification settings.

  • Hi, I have lost my iphone but i have its backup in itunes, how can i restore my contact/sms using itunes or is there any other way, please help

    Hi, I have lost my iphone but i have its backup in itunes, how can i restore using itunes or is there any other way for this
    please suggest

    You can restore that backup to a replacement iPhone, if that's what you're asking. If you want to extract data from the iPhone backup, you'll need third-party software to do so:
    http://www.iphonebackupextractor.com/

  • How can I read something from keyboard using i/o operations?

    I wrote the following code in java using *"oracle Jdeveloper 11g release 2"* platform and i think it's correct, but I have a little problem when I try to execute him, it asks me to introduce a number, and this it's correct, but I don't know how to introduce that number. If i want to write the same code in c or c++ using Visual Studio it's very easy when i want to introduce a number i must run the code and then a console window will appear and then i introduce the number.
    Could someone to give me a link at a tutorial about how to use *"oracle Jdeveloper 11g release 2"* when I have to use i/o operations or something useful.
    package instante;
    import java.io.*;
    public class Read_from_keyboard {
    public static void main(String[] args) {
    BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in), 1);
    double number_read = 0.0;
    String line = "";
    try {
    System.out.flush();
    System.out.println("Give a number: ");
    line = keyboard.readLine();
    Double tmpDouble = Double.valueOf(line);
    number_read = tmpDouble.doubleValue();
    System.out.println("The number is: " + number_read);
    } catch (IOException e) {
    System.out.println(" Input from keyboard " + e.toString());
    System.exit(1);
    Thank you!
    Edited by: Iosif on Nov 9, 2012 5:06 AM

    Its a command line application. Perhaps JDeveloper has support built in to be able to do that in the IDE, but generally you'd just want to run a command line application on the command line / shell. How to do that is described in any Java book, in the Oracle Java tutorials and in just about a couple hundred/thousand articles you can find through Google.
    Other than that, the JDeveloper forum is here:
    JDeveloper and ADF

  • When I compose a message, I don't get the composition menu - attachemnt, send, etc. I can only attach something if I use one of the codewords like "attach".

    I have had to install Thunderbird on new PCs and I no longer get the menu bars on the composition page. I cannot attach a file unless I type "attach" or another keyword in the body of the message. Then I get a reminder asking if I forgot to attach something and can click on that. How do I get my menu bars back? Clicking in the upper right corner doesn't give me the right options.

    In the main menu bar of the compose window:
    View - Toolbars
    Check 'Composition Toolbar'.
    In case the menu bar is hidden as well press Alt or F10 to bring it back.

  • Can't open, download or view PDFs - Tried all fixes recommended on this site!

    I updated Firefox yesterday and now I am suddenly unable to open, download or view PDF documents on my mac. I just get a blank page in Firefox when I click on a PDF link.<br />
    I tried every fix I could find on this forum and others:<br />
    Disabling both the Acrobat NPAPI Plugin and the Acrobat Reader Plugin<br />
    delete the mimeTypes.rdf file in the Firefox Profile Folder to reset all file actions.<br />
    installing another PDF reader plug-in<br />
    Cleared download history<br />
    Reset Firefox<br />
    Checked status of Download Folder - no 'user set' values<br />
    Reinstalled Firefox<br />
    Fixed all Mac Permissions<br />
    Still same thing PDF tries to open in a new tab - I just get a blank window… even when my PDF Preferences are set for the pop-up dialogue to show so I can choose whether to save, open or view.<br />
    AND my Firefox preferences are set for viewing in Acrobat Pro X (this was how I had it set up before the update and had no problems - all PDFs opened in this application. (my preferred)
    I am stumped. Anyone have any fresh ideas? HELP!! :) Thank you

    The Adobe Reader plugin may not be working properly on Mac.
    * https://support.mozilla.org/kb/pdf-files-are-blank-and-cant-be-downloaded-mac
    * https://support.mozilla.org/kb/Opening+PDF+files+within+Firefox
    Disable the Adobe Reader plugin in Firefox (Tools > Add-ons > Plugins) and use the external Adobe Reader application or Preview application instead.
    PDF files may be found under entries like Portable document or Adobe PDF document.
    *Firefox > Preferences > Applications > Adobe PDF document : Use Adobe Reader

  • A method for passing in the system date to either a substitution variable or directly into a calc script for use on the fix statement

    Does anyone have an idea of how to pass in the server system date into a calc script or into a substitution variable so that I can fully automate my calc script to only calculate the current day? Thanks very much for any assistance on this.

    unsure why cannot att bat<BR>below is raw code meant to insert into .bat file<BR>================================================<BR><BR>code starts below this line<BR>================================================<BR>:: <BR>:: pls ensure essbase server up and running <BR>:: batch file to upd subs var <BR>:: insert correct values below<BR>:: <BR>:: substitution variables set up in cube: curryr, lastyr <BR>:: substitution variables set up in cube: currmth, prevmth ... <BR>::<BR><BR>:: setting of local env vars<BR>setlocal<BR>::<BR><BR>:: setting of job control vars<BR>set svr=<< insert value here >><BR>set uid=<< insert value here >><BR>set pwd=<< insert value here >><BR>::<BR><BR>:: setting of date and time vars<BR>for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (<BR>set dayofweek=%%i<BR>set day=%%k<BR>set month=%%j<BR>set year=%%l<BR>set datestamp=%%l_%%j_%%k<BR>)<BR>for /F "tokens=1-2 delims=: " %%i in ('time /t') do (<BR>set hour=%%i<BR>set minute=%%j<BR>set timestamp=%%i_%%j<BR>)<BR>::<BR><BR>:: setting year vars<BR>set /a curryr=%year%<BR>set /a lastyr=(%year% - 1)<BR>::<BR><BR>:: setting paths and files<BR>set destpath=<< insert path here >><BR>set errpath=<< insert path here >><BR>set errfiles=%errpath%\*.err<BR>set errfiledir=%errpath%\%datestamp%_%timestamp%_err.dir<BR>set errfile=%destpath%\%datestamp%_%timestamp%_err.err<BR>set logfile=%destpath%\%datestamp%_%timeStamp%_log.log<BR>set upd_var_file=%destpath%\upd_var.txt<BR>::<BR><BR>:: initial housekeeping<BR>if exist %errfile% del %errfile%<BR>if exist %logfile% del %logfile%<BR>if exist %upd_var_file% del %upd_var_file%<BR>if exist %errfiledir% del %errfiledir%<BR>::<BR><BR>:: start all<BR>echo. >> %logfile%<BR>echo rem &0 >> %logfile%<BR>echo. >> %logfile%<BR>echo rem --- start all --- >> %logfile%<BR>date/t >> %logfile%<BR>time/t >> %logfile%<BR><BR>:: dates<BR>echo rem --- dates --- >> %logfile%<BR>echo Curr Year = %curryr% >> %logfile%<BR>echo Last Year = %lastyr% >> %logfile%<BR><BR>:: gen temp txt to upd subs vars<BR>echo rem --- upd subs vars start --- >> %logfile%<BR>echo. >> %upd_var_file%<BR>echo. >> %upd_var_file%<BR>echo login "%svr%" "%uid%" "%pwd%"; >> %upd_var_file%<BR>if %month% == 01 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Dec"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Nov"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q4"; >> %upd_var_file%<BR>)<BR>if %month% == 02 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Jan"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q1"; >> %upd_var_file%<BR> echo updatevariable "CurrYr" "%svr%" "" "" "FY%curryr%"; >> %upd_var_file%<BR> echo updatevariable "NextYr" "%svr%" "" "" "FY%nextyr%"; >> %upd_var_file%<BR> echo updatevariable "NextY2" "%svr%" "" "" "FY%nexty2%"; >> %upd_var_file%<BR> echo updatevariable "LastYr" "%svr%" "" "" "FY%lastyr%"; >> %upd_var_file%<BR> echo updatevariable "LastY2" "%svr%" "" "" "FY%lasty2%"; >> %upd_var_file%<BR> echo updatevariable "LastY3" "%svr%" "" "" "FY%lasty3%"; >> %upd_var_file%<BR> echo updatevariable "PrevYr" "%svr%" "" "" "FY%lastyr%"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Dec"; >> %upd_var_file%<BR>)<BR>if %month% == 03 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Feb"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Jan"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q1"; >> %upd_var_file%<BR> echo updatevariable "PrevYr" "%svr%" "" "" "FY%curryr%"; >> %upd_var_file%<BR>)<BR>if %month% == 04 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Mar"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Feb"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q1"; >> %upd_var_file%<BR>)<BR>if %month% == 05 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Apr"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Mar"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q2"; >> %upd_var_file%<BR>)<BR>if %month% == 06 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "May"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Apr"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q2"; >> %upd_var_file%<BR>)<BR>if %month% == 07 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Jun"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "May"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q2"; >> %upd_var_file%<BR>)<BR>if %month% == 08 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Jul"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Jun"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q3"; >> %upd_var_file%<BR>)<BR>if %month% == 09 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Aug"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Jul"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q3"; >> %upd_var_file%<BR>)<BR>if %month% == 10 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Sep"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Aug"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q3"; >> %upd_var_file%<BR>)<BR>if %month% == 11 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Oct"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Sep"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q4"; >> %upd_var_file%<BR>)<BR>if %month% == 12 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Nov"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Oct"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q4"; >> %upd_var_file%<BR>)<BR>echo. >> %upd_var_file%<BR>echo exit; >> %upd_var_file%<BR><BR>:: run temp txt to upd subs vars <BR>esscmd %upd_var_file%<BR>echo rem --- update subs vars end --- >> %logfile%<BR> date/t >> %logfile%<BR> time/t >> %logfile%<BR><BR>:: end all<BR>echo rem --- end all --- >> %logfile%<BR> date/t >> %logfile%<BR> time/t >> %logfile%<BR><BR>: end_all<BR>endlocal<BR><BR>===============================<BR>

  • The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.

    Hello All,
    I am getting below error can you please help me
    Error:-
    The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.

    Perhaps this thread will help you out
    http://stackoverflow.com/questions/11453066/error-the-transaction-associated-with-the-current-connection-has-completed-but
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How i can deal with oracle file by using php api

    how I can deal with oracle file by using php api ?

    What has this to do with Reflections and Reference Objects?

  • I can't activate Facetime or Messages using my apple id. I

    I can't activate Facetime or Messages on my iPad 2 using my apple id. It comes up with the message that my username or password is incorrect.
    But I can login to the app store using the same username/password.
    This problem is restricted to Facetime and Messages.
    Does anybody have a solution for me?

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime: Set-up, Use, and Troubleshooting Problems
    http://tinyurl.com/32drz3d
     Cheers, Tom

  • Using variables in a fix statement

    I am using a nested fix statement on a dense member and would like to use variables to represent certain intersections. Since the variables need to be within a calc member bloc, where do I place them? Do they go inside the fix statement witht the parenthesis just around teh variables or the last parenthesis at the end of the fix statement?

    If you mean substitution variables, they are defined outside the calc script at a dp, app, or server level. They simply substitute their textual value at the place they appear in the script. If the substitution results in a valid calc script where it occurs, then you are fine. So FIX ( &subvar ) could be valid.If you mean temporary variables, they hold intermediate calculational values. The docs say "VAR commands can only be assigned values within a member calculation or when VAR is declared. " That is, you may either say 'VAR tempvar = 1000; ' [declare and set value] or 'VAR tempvar;' [declare only, often at the start of your script] then somewhere in the script 'tempvar = expression;' [value gets assigned]. This last expression would not appear within the parentheses of a FIX ( members ) statement, but somewhere within the FIX block. You would never say FIX ( tempvar ) as it is not an outline member.

  • How to use decode or case function in this?

    Hi,
    I want to implement this condition in a query without using any user defined functions
    1.if (T_fees = 'ABC' then if (p_fees>0) then nvl(p_fees,0) else (p_fees + a_fees) else 0)
    2. if(g_fees <> (if t_fees = 'ABC' then if (p_fees>0) then nvl(p_fees,0) else (p_fees)
    else 0
    Is it possible to use any nested 'CASE' statement ?
    This is very urgent...
    Regards,
    Shilpa

    Hi,
    Is it possible to use any nested 'CASE' statement ?Yes it it possible.
    "afiedt.buf" 7 lines, 89 characters
      1  SELECT sysdate FROM DUAL
      2  WHERE 1 = (CASE WHEN 1=1  AND 2=2 THEN
      3             1
      4       ELSE
      5             2
      6*     END)
    SQL>/
    SYSDATE
    07-AUG-06
    1 row selected.
    "afiedt.buf" 11 lines, 139 characters
      1  SELECT sysdate FROM DUAL
      2  WHERE 1 = (CASE WHEN 1=1  AND 2=2 THEN
      3             CASE WHEN 3=3 AND 4=4 THEN
      4                     1
      5             ELSE
      6                     0
      7             END
      8       ELSE
      9             0
    10*     END)
    SQL>/
    SYSDATE
    07-AUG-06
    1 row selected.
    You can implement your logic.
    Regards

  • Firefox won't access the internet but [as now with this question] IE does - this has happened before where I used IE to fix firefox

    firefox won't access the internet but [as now with this question] IE does - this has happened before where I used IE to fix firefox

    See if this helps you - [[Cannot connect after upgrading Firefox]]

  • Use java do something similiar to ws_ftp for web based

    Hi, I'm just wondering is it possible to use java or java applet to do something similiar to ws_ftp for web based purpose?
    The idea is 2 windows. 1 for local harddisk browsing and another for the remote ftp server. So that I can drag and drop (or click the arrow button) from this window to that window to upload a file.
    If it's possible. can anyone help me get started? Such as where to find documentation or what library to use etc? Thanks

    if i am not wrong, you can use servlets and serialization....but you have to check those out yourself.
    sorry, i am not being not of much help!

  • How can i transfer something from my iphone to my ipad using bluethooth??

    how can i transfer something from my iphone to my ipad using bluethooth??

    You can use iTransfer.
    https://itunes.apple.com/sg/app/itransfer-share-files-ease/id480195086?mt=8

Maybe you are looking for

  • Exchange 2013 SP1 OWA something went wrong

    Hi, I have a three node exchange 2013 DAG cluster that I upgraded to SP1 three days ago.   All email flows currently work and ECP is available on all node on all browsers for all users.   OWA was working on 2013 CU3.   After  the upgrade to SP1  and

  • Issues with T420s running win 8.1 x64

    I'm having the following issues on a T420s that I recently bought with a fresh install of windows 8.1 x64 + Office 2013, after installing most of the available drivers. The exact product ID is 4171 52U. Function keys not working correctly: Function-f

  • Iphoto books in widescreen?

    Hi. I'm making a series of slideshows for a wedding dvd, and one of the slideshows is actually a book. I've got the normal slideshows in widescreen, but it doesn't seem to give me that option with the book one. Does anyone know how to get the book sl

  • How do I connect my Iapd to to airprint epson stylus NX 430

    how do I connect my Ipad2 to an airprint Epson Stylus NX 430

  • How To Disable Save Sent Copy

    Hi I'm a noobs bout blackberry (infact I dun have one) My boss blackberry kept a sent copy evrytime he emails (he use BIS service and our company doesn't have BES) and it's kept filling the sentbox folder on the server. How can I disable this feature