Compiling custom imports

Hi All,
I am stuck with code compilation problem. Seeking Help.
I have 2 source files. One is compiled and I am using this compiled file as an import in my other source file.
Both the source files are in different packages.
When I go ahead and compile my source file which using the other one as an import then I get the error stating that the package which I have used as the import does not exists.
I have tried to compile setting that package in classpath as well. But, no luck.
I have used various compiling options with javac, like, -classpath, -cp, -sourcepath, but still no luck.
The directory structure I am having is like this
C:\...\com\example\web\Selector.java and
C:\...\com\example\model\Expert.java I am trying to import
com.example.model.Expert.java into
com.example.web.Selector.java Help needed regarding how to compile successfully Selector.java
I will really appreciate any suggestions from you guys.
Thanks and Regards
Animesh

Hi,
Guys please do not take the literal meaning with the line saying I am importing C\...com\example\model\Expert.java into C\...com\example\web\Selector.java .
I know we cannot import file, we do import classes in java.
The problem is still the same I am trying to compile my source code with custom made package import and it is not compiling.
Please help. I will really appreciate useful suggestions.
Thanks and Regards.
Animesh

Similar Messages

  • Error while compiling CUSTOM.PLL with frmcmp_batch

    We have a strange issue here. One of the users is unable to compile custom.pll . He is getting the issue
    PDE-PLI038 Cannot open file for use as a PL/SQL Library
    This is the below file permission for the custom.pll
    -rwxrwxrwx 1 applmgr oaa 20480 Apr 29 02:57 CUSTOM.pll
    This is the one with custom developments in it.
    This is user id
    uid=114(ccankim) gid=1026(oaa)*
    But when I as a applmgr user is able to compile the CUSTOM.pll successfully.
    applmgr>frmcmp_batch module=CUSTOM.pll userid=apps/***** module_type=library
    Forms 10.1 (Form Compiler) Version 10.1.2.3.0 (Production)
    Forms 10.1 (Form Compiler): Release  - Production
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    PL/SQL Version 10.1.0.5.0 (Production)
    Oracle Procedure Builder V10.1.2.3.0 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE     10.1.0.5.0      Production
    Compiling library CUSTOM...
    Compiling Package Spec CUSTOM......
    Compiling Package Body CUSTOM......
    Done.
    Any idea Gurus...
    EBS 12.1.3
    UNIX HP-UX B.11.31 U ia64 4294967040 unlimited-user license
    DB 11.2.0.2

    $ which frmcmp_batch
    /p01/app/applmgr/oappsp1/apps/tech_st/10.1.2/bin/frmcmp_batch
    $ ll -ltr /p01/app/applmgr/oappsp1/apps/tech_st/10.1.2/bin/frmcmp_batch
    -rwxr-xr-x 1 applmgr oaa 22544380 Dec 21 12:17 /p01/app/applmgr/oappsp1/apps/tech_st/10.1.2/bin/frmcmp_batch
    The user has execute permission.( because his user id belongs to group oaa which has execute permission)
    Full 777 permission on the directory where this CUSTOM.pll exists.
    The confusing part is, if the file would have been corrupted, it would not have been compiled successfully under applmgr user. So the doc id 1082077.1 as of now doesn't help a lot.
    :(

  • Cannot Change Custom Import Settings For AAC's

    Last night I changed the custom import settings from 192 kbps to 160 kbps for a particular mp3 album I wanted to convert with that bitrate. I tried to change the custom settings back to 192 kbps (the bitrate most of my mp3's & wma's are in). For some reason, the window that came up many times before refuses to pop up now. I tried the custom settings for mp3's and that window still pops up. Anyway, I tried a repair and nothing happened. I uninstalled iTunes, Quicktime, Bonjour, and Apple Software Updates, deleted there corresponding folders in C:/Program Files and then restarted the computer. I downloaded the iTunes 9 installer through the iTunes website and proceeded to reinstall iTunes. Still, the problem exists. I'm not sure what else to do? The only other thing I can think of is to do the same except install iTunes 8 instead and then search for updates and reinstall iTunes 9 that way. Would anyone know of any other method on solving my problem? Any help would be greatly appreciated, thanks!

    glenn,
    I have the same problem and it is driving me crazy. If you find a solution please email me at [email protected]
    thanks and good luck

  • Auditing a Custom Import package

    We are having issues with BPC data auditing on a custom import package.  We are using the convert and dump load tasks just like in the standard import package.  The difference is that we have those surrounded by other SSIS tasks to perform other pieces of the import process.  The specific issue is that when we look at the detailed audit data, we are not seeing all of the records from our custom import.  We usually see that the import package took place, but we also usually see only a small fraction (if any) of the actual records that were posted (and which we can see in BPC) in the audit.
    My first question is, does the "Data Manager Import" option under the audit settings work with custom import packages using the convert and dump load tasks, or is it exclusive to the standard import package?  Secondly, if it does work with custom import packages, what might be some causes and/or resolutions to this issue?

    Just an update on the two issues that we are seeing...
    First, I have tested the standard Import and the Append into Fact Table packages, and both are audited correctly and completely.  This is important because our import package utilizes both of these styles of import.  One set of data is transactional, so it is loaded similar to the Append into Fact Table package.  The other set is a merge style import, so it is very similar to the standard import.  I see all records in the AuditDataFincance table in the Extra database for both of these packages.  This would lead me to believe that we are seeing some interference either between these two dump load tasks in the same package or some other SSIS package.  It is important to note that these dump load tasks are wrapped in foreach loops to pickup all files in a directory.  Looking at the package, my guess would be that either having two dump load tasks or having said tasks wrapped in a foreach loop would probably be the culprit.  My next step will be to strip the package down to test just these pieces.  Does anyone know if either of these would cause an issue with auditing?
    Secondly, I stated that we are not seeing the temp audit files in the STAGED or LOADED folders, which is making it more difficult to debug this issue.  After testing several packages, I noticed that the standard import and clear packages audit correctly, but they never create files in the STAGED or LOADED folders.  However, the Append into Fact Table package DOES create these files.  What I noticed in the AuditHdrFinance table in the Extra database was that the StagingCode values for these packages were different before they were loaded.  A value of 0 signifies that the package has already been loaded.  Append into Fact Table had a value of 1, which appears to signify that an audit file is waiting to be loaded in the STAGED directory.  The others had a value of 2, which I am guessing signifies that they are currently being staged in memory or some other location.  Does anyone have any information on what the different StagingCode values signify and why different packages have different codes?

  • Custom Import settings (MP3) not working?

    I downloaded itunes today having read the help guides that I could d/l files in MP3 format. I changed the custom import settings as per the help guide and purchased music - only to find the downloads are still in m4p format & as such are no good for my mp3 player.
    Right clicking & converting doesn't work as they are protected.
    I am hoping this is just an error on the custom set up on my part, but reading this forum I did read about protected and Plus purchases, which I did not see in the help guide before I bought the music.
    So, my question is: can the protected files be downloaded with the customized MP3 encoder settings or am I completely limited to Plus purchases?
    Thanks!

    The import setting have no effect on store downloads, all iTunes store downloads are AAC (MP4). The import settings are used to convert the songs imported from CD or to convert unprotected songs in iTunes, not for choosing a format to download song from the store.
    You can't convert standard iTunes copy protected songs, only the iTunes Plus purchases can be directly converted to another format. Where possible if you need to convert you should go for iTunes Plus tracks. The only thing you can do with standard songs apart from playing them in iTunes or on an iPod/iPhone is burn them to Audio CD. You can use that CD just like any regular one. If you need songs that will play on a non Apple player you'd be better looking around for other stores that provide unprotected MP3 downloads.

  • Duplicate command is not working for custom importer

    Hi All,
    I am working on a custom importer plugin. Basic features are working fine, but, I'm facing an issue with Duplicate functionality.
    I added a new custom importer clip to project and created a duplicate of that clip (by right clicking the clip in Project window and selecting Duplicate from pop-up menu). Then I added both clip instances to timeline. Now, if I change properties of one clip instance it reflects in both clips. I noticed that both ClipIds are same and they are referring to same media path. I also observed the same behavior in SDK_Custom_importer sample. But, built in 'Color Matte' and 'Title' clips works fine.
    As per my understanding, Duplicate command should create a new clip from existing clip and new clip should be independent of original clip after creation.
    How to fix this issue? Is there any selector that I should handle to support Duplicate functionality?
    Thanks & Regards,
    Chandan

    Hi Chandan,
    The Color Matte and Title clips are not quite the same as your custom importer example.  Those are synthetic clips, without a file reference on disk.  If you exported a title to a file on disk, and then reimported it, and duplicated it so that there were two clips in the Project panel that reference the same file on disk, I think you would have the same behavior as what you're seeing with your custom importer.  Duplicate doesn't create a new file on disk.  The user would need to do that manually, and then import the new file.
    Regards,
    Zac

  • Custom importer

    We have a custom importer plugin for premiere CS6.
    We dont save a custom file on disk, but we render the frames demanded by Premiere framework on the fly and return the data in imImportImageRec in imImportImage call.
    1) The sequence when we create a new instance goes like
    imGetPrefs8   - we show a custom entry dialog here - store the result in a global variable which is accessed in imGetInfo8.
    imGetInfo8     - with private data pointer (where we store pointer to our custom class which actually renders the data( based on the variable set in imGetPrefs8 )
    imImportImage - with private data pointer filled in imGetInfo8 - render here based on the frame number received using the private data.
    2) And when we save and load the instance we get a call to imGetInfo8  with the private data( based on which  we create a instance of our custom class to render data)
    and subsequent calls to imImportImage with the private data filled in imGetInfo8.
    3) Now the case comes when we modify the existing instance by double clicking it.
    We get a call to imGetPrefs8  but not  imGetInfo8.
    but we are not able to modify the private data as per user changes done in imGetPrefs8 , as we dont get a call to imGetInfo8.
    So the subsequent calls to imImportImage work with the old private data, hence the changes dont reflect.
    How should we go about it?
    Guide.

    in imGetPrefs8 why don't you check for privateInstance == NULL then create as needed.
    If != NULL call your modification function.
    imGetInfo89 should only populate the selector struct with info from the private data (already allocated by imGetPrefs8).
    I've never looked at the synthetic importer example but this is exactly what you're doing so that should be your starting code to hack on.

  • Custom import

    HI, I'm newbee in coding In Lightroom, and need to design a custom import to import photo automatic in Lightroom. I has coded a few code below using SDK 3.0. I would like to get help from your guys a fews things:
    1) It's the code below is the right way to begin?
    2) and I also got the error: the path is invalid, og miss when i calling catalog:addPhoto().
    I'm very thankfully for help from you guys.
    -- Lightroom API
    local catalog = import 'LrApplication'.activeCatalog()
    local path  = 'C:\\Users\\dev\\Desktop\\Test\\Picture\\camera.jpg'
    local LrFileUtils = import 'LrFileUtils'
    local LrPathUtils = import 'LrPathUtils'
    local LrTask =  import 'LrTasks'
    -- Add photo to catalog
    catalog:withWriteAccessDo("writeAccess", function(context)
            --syncablePhotos = catalog:getAllPhotos()
            local lrphoto = catalog.addPhoto(path)
    end)
    -- Code below is just for Test
    local LrDialogs = import 'LrDialogs'
    MyHWExportItem = {}
    function MyHWExportItem.showModalDialog()
        -- body of funtion
        --LrDialogs.message( "ExportMenuItem Selected", "Hello plugins!", "info" )
        if LrPathUtils.leafName(path) then
            local l = LrPathUtils.leafName( path)
            LrDialogs.message("ExportMenuItem Selected", l, "AtutoImportExport")
        else
            LrDialogs.message("ExportMenuItem Selected", "file not found ", "AtutoImportExport")
        end
    end
    MyHWExportItem.showModalDialog()

    Hi Matt, I'm so happy for your help, thanks a lot, and as you said, and the error is now gone, yeahh!!.   But a new error appear right after that, what is wrong?
    Here is my code so far:
    -- Lightroom API
    --local LrFolfder = import 'LrFolder' -- Creating an folder object
    local catalog = import 'LrApplication'.activeCatalog()
    local path  = 'C:\\Users\\dev\\Desktop\\Test\\Picture\\camera.jpg'
    local LrFileUtils = import 'LrFileUtils'
    local LrPathUtils = import 'LrPathUtils'
    local LrTasks =  import 'LrTasks'
    local LrDialogs = import 'LrDialogs'
    -- Export to a folder
    -- Code below is just for Test
    AddPhoto = {}
    function AddPhoto.showModalDialog()
        -- body of funtion
        --LrDialogs.message( "ExportMenuItem Selected", "Hello plugins!", "info" )
        -- logger:trace( "updateStatus() is executing." )
        LrTasks.startAsyncTask( function()
            --Add photo to catalog
                catalog:withWriteAccessDo("writeAccess", function(context)
                    --local syncablePhotos = catalog:getAllPhotos()
                    local lrphoto = catalog:addPhoto(path){}
                    --local folders = catalog:getFolders()
            end)
        end)
        if LrPathUtils.leafName(path) then
             local l = LrPathUtils.leafName( path)
             LrDialogs.message("ExportMenuItem Selected", l, "AtutoImportExport")
         else
             LrDialogs.message("ExportMenuItem Selected", "file not found ", "AtutoImportExport")
        end
    end
    AddPhoto.showModalDialog()

  • Compiling custom.pll requires an outage?

    Hi,
    We need to compile the custom.pll in production. Does this require an outage to do that? What is the impact of compiling custom.pll without an outage?
    -Ritesh

    If this compile is done during non-business hours, and if some users are still connected to forms sessions. Would they have issues connecting to forms? Throw any kind of error? We are planning to compile the custom.pll today evening after business hours and bounce the services in the weekend. We are concerned that compiling custom.pll would cause an issue to existing users if they r connected?
    My question basically is - compiling a custom.pll without shutting down services does it effect any end users to experience errors?
    -Ritesh

  • "No active legal regulations found for country US "  while trying to create the Customs Import Declaration

    Dear Experts,
    As part of creating Customs Import Declaration manually, when I selected the FTO and try to use create button I am getting error message .
    Can you please help me in this regard .
    No active legal regulations found for country US
    Ram

    Hi Ram,
    As the error message straight away tells , you need to activate Legal Regulation for Customs Management ( in standard case, it will be ACE) for US country through the below path:
    SPRO-->SAP Global Trade Services-->Customs Management-->Activate Leagl Regulation for Customs Management at Country/Country Group level
    In case of any further queries, please let me know it.
    Regards,
    Aman

  • Custom Importer Issue

    Hi All,
    I am using Premiere Pro CS4 SDK and Premiere Pro CS4 trial version to create a custom importer. I tried SDK_Custom_Importer sample and my issue is -
    When I select File->New->SDK Custom Import... the .sdkc file created during imGetPrefs8 is not listed in the Project panel. But the entry shows up if I select the same file from File->Import dialog.
    How do I make sure the file is added even when I select File->New->SDK Custom Import?
    Thanks,
    Chandan

    Hi Chandan,
    The Color Matte and Title clips are not quite the same as your custom importer example.  Those are synthetic clips, without a file reference on disk.  If you exported a title to a file on disk, and then reimported it, and duplicated it so that there were two clips in the Project panel that reference the same file on disk, I think you would have the same behavior as what you're seeing with your custom importer.  Duplicate doesn't create a new file on disk.  The user would need to do that manually, and then import the new file.
    Regards,
    Zac

  • Compiling custom controls with ant

    Need help figuring out which ant task I need to compile custom controls (.jcs files).
    I’ve read several posts about using wlwBuild and workshop.core.Compile but these
    tools don’t satisfy my needs when it comes to automating and integrating anthill,
    cvs, junit… I’m also not so keen on the idea of keeping a .work file synced between
    all developer’s IDEs and the staging/production build machines. I’d really like
    to have a nice clean ide independent ant script build my project. It seems BEA
    somewhat anticipated this when they created genxmlbean to compile XMLBeans and
    JwsCompile for web services, but I have not found a similar ant task that I can
    use to compile projects with custom controls (.jcs files) created in workshop.
    Alternatively if there’s a way in workshop to compile and package an application
    to a production worthy ear that does not include all the extra .workshop ejbs
    used for debugging, that would get me by for now. Any advice would be appreciated.

    Thanks for your advice. Unfortunately, I've been down that path and the generated
    build script uses wlwBuild and the .work file to create the ear, which I'm trying
    to avoid.
    "David Karr" <[email protected]> wrote:
    >
    It may help to know that you can generate an Ant build script from Workshop
    (for
    either a project or application), which when executed from the command
    line, will
    do everything required to build the project or application. You can even
    tell
    Workshop to always use the build script when building the project. You
    can't do
    this for the application, however. You have to go into the project/application
    properties to find this.
    "Ed Barnes" <[email protected]> wrote:
    Need help figuring out which ant task I need to compile custom controls
    (.jcs files).
    I’ve read several posts about using wlwBuild and workshop.core.Compile
    but these
    tools don’t satisfy my needs when it comes to automating and integrating
    anthill,
    cvs, junit… I’m also not so keen on the idea of keeping a .work file
    synced between
    all developer’s IDEs and the staging/production build machines. I’d
    really like
    to have a nice clean ide independent ant script build my project. It
    seems BEA
    somewhat anticipated this when they created genxmlbean to compile XMLBeans
    and
    JwsCompile for web services, but I have not found a similar ant task
    that I can
    use to compile projects with custom controls (.jcs files) created in
    workshop.
    Alternatively if there’s a way in workshop to compile and package an
    application
    to a production worthy ear that does not include all the extra .workshop
    ejbs
    used for debugging, that would get me by for now. Any advice wouldbe
    appreciated.

  • Simple logic group to operate prior to custom import script?

    Hi all,
    Thanks for taking the time to read my question. I will gladly mark this thread as helpful or answered if you can help me. I'm a novice at FDM so please bear with.
    I have a custom import script that assigns ICP None to a specific account (overriding any ICP detail). However, now I need the ICP detail for that account in a second statistical account. I setup a simple logic group to create the logic account that I can map to the statistical but then realized that the import script runs prior to the logic group so I lose all ICP detail in the logic account as well.
    Is there a way to run the logic group prior to import script or is there a better way to accomplish what I'm trying to do?
    I'm not sure how critical this is but I'm using FDM v11.1.1.3.01 adapter 11x-G5-C
    Edited by: user4591089 on Aug 17, 2011 2:10 PM
    Edited by: user4591089 on Aug 17, 2011 2:50 PM

    Do the following:
    1) Remove the custom import script.
    2) Create a complex logic account and override the ICP dimension in the Group By Column with the Value [ICP None]. This will then be what is diplayed on the import screen for this logic account.
    3) Map the original source as the statistical account and the logic account as appropriate
    Edited by: SH on Aug 18, 2011 9:48 AM

  • Compiling CUSTOM.pll

    Hi Everybody,
    I need some integrated solutions between ORACLE imaging solutions server and EBS server.So that it is advisory to pick AXF_CUSTOM.pld file (present in Imaging solutions server) to EBS server,convert it to an AXF_CUSTOM.pll file, make modifications, and then compile it to an AXF_CUSTOM.plx file.
    But I have some doubt here.
    My Imaging solution server:Windows Machine.
    My EBS server(12.1.1):Linux machine
    And i m transferring AXF_CUSTOM.pld file from windows machine to Linux machine.So should there some dos2unix command be needed before converting it???
    With Regards
    Jyoti

    Hi Hussein,
    First I have run the below scripts successfully :
    @AXF_CREATE_TABLES_SYNONYM.sql
    @AXF_EBS_PROPERTIES_DATA.sql
    @AXF_APPS_INIT.sql
    @AXF_ADD_EBS_ATTACHMENT_PROC_R12.sql
    @AXF_ADD_EBS_ATTACHMENT_PROC_R11.sql
    @AXF_MANAGED_ATTACH_AVAIL.sql
    @AXF_MANAGED_ATTACH_VALUES.sql
    @AXF_MANAGED_ATTACHMENT_DATA.sql
    @AXF_SOAP_CALL_PROC.sql
    Then complination procees done as follows:
    copy the AXF_CUSTOM.pld file to the
    E-Business Server (to FORMS_PATH for Oracle E-Business Suite 12 from
    Oracle E-Business Suite 12: MW_HOME/ECM_HOME/axf/adapters/ebs/R12/AXF_CUSTOM.pld
    If you are using a Linux/UNIX system and copied the .PLD
    from a Windows system, issue the dos2unix command before
    converting it below.(Not done)
    And at first I m not able to compile AXF_CUSTOM.PLL successfully.
    Below are the steps I followed:-
    _1. Copied AXF_CUSTOM.pld to FORMS_PATH._
    _2. Open AXF_CUSTOM.pld file in forms builder connecting with APPS Database User._
    _3. Converted AXF_CUSTOM.pld to AXF_CUSTOM.pll.while converting I got the error_
    PDE-PLI038 - Cannot open file as a PL/SQL Library as expected.
    _4. Compiled AXF_CUSTOM.pll to AXF_CUSTOM.plx while compiling I got many errors_
    e.g. 'APPSPECIAL.ENABLE' must be declared. Since the library files were missing_
    so I attached the library files and the files compiled successfully.
    _5. Downloaded CUSTOM.pll from the Server from $AU_TOP Resource Directory._
    6. Open the CUSTOM.pll and modified it as follows.
    _6. a function zoom_available return boolean is_
    begin
    -- Required for ALL integrations
    return AXFCUSTOM.zoom_available();_
    end zoomavailable;_
    _6. b procedure event(event_name varchar2) is_
    begin
    -- Required for AXF integrations
    AXFCUSTOM.event (event_name);_
    null;
    end event;
    _7. Attached AXF_CUSTOM.pll to the CUSTOM.pll._
    7. Compiled CUSTOM.pll at local machine.
    _8. Deployed CUSTOM.pll to $AU_TOP Resource Directory._
    9. Compiled CUSTOM.pll to CUSTOM.plx at the server using Command
    frmcmpbatch module=CUSTOM.pll userid=apps/a07r12 output_file=CUSTOM.plx_
    moduletype=library batch= yes compile_all=special._
    After performing these steps when we try to open the forms from the instance we are getting the error as follows:-
    Then get the error as APP-FND-01926:The custom event WHEN-LOGON-CHANGED raised unhandled exception:ORA-06508:PL/SQL:couldnot find program unit being called
    ORA-01403:no data found
    Then I compiled AXF_CUSTOM.PLD in another machine and transfer it to mine.After that I performed all the steps every library files are compiled and generated now.I don’t know why the Zoom button is not enabled. It should have been enabled for all the forms I guess.
    With Regards
    Jyoti

  • Sequence# vs. Total# vs. Import# in Custom import template

    Does anyone know the difference between these in the custom import naming template?

    Try this:
    Sales:=
    SUM( 'PTV FLAT HITLIST'[SALES THS#EUR] )
    PY Sales:=
    CALCULATE(
    [Sales]
    , FILTER( ALL( PERIOD[FISCAL YEAR] )
    , PERIOD[FISCAL YEAR] = MAX( PERIOD[FISCAL YEAR] ) - 1
    Sales vs PY Sales:=
    [Sales] / [PY Sales]
    This will work if you put PERIOD[MONTH NUMBER] on the rows under PERIOD[FISCAL YEAR].
    If you must keep PERIOD[DATE] on the rows, then you'll need to handle this a little differently. PERIOD[DATE]  uniquely identifies a month. This means that with the measures I have suggested above, the filter context will not be cleared from PERIOD[DATE]
    and so the filter context of CALCULATE() will be an impossible condition:
    On Row Label 2014-03, the filter context will be PERIOD[DATE] = 2014-03 && PERIOD[FISCAL YEAR] = 2013.
    If you must keep PERIOD[DATE] as your rowfilter, try this:
    Sales:=
    SUM( 'PTV FLAT HITLIST'[SALES THS#EUR] )
    PY Yr Sales:=
    CALCULATE( [Sales]
    , FILTER( ALL( PERIOD[FISCAL YEAR] )
    , PERIOD[FISCAL YEAR] = MAX( PERIOD[FISCAL YEAR] ) - 1
    PY Mo Sales:=
    CALCULATE( [Sales]
    , FILTER( ALL( PERIOD )
    , PERIOD[FISCAL YEAR] = MAX( PERIOD[FISCAL YEAR] ) - 1
    && PERIOD[MONTH NUMBER] = MAX( PERIOD[MONTH NUMBER] )
    PY Sales:=
    IF( ISFILTERED( PERIOD[DATE] )
    , [PY Mo Sales]
    , [PY Yr Sales]
    Sales vs PY Sales:=
    [Sales] / [PY Sales]

Maybe you are looking for