LookupCube based on CurrentMember of different dimensions along with date range

Hi,
I want to get a value through LookupCube based on CurrentMember of different dimensions along with a date range. For example, I want to make this happen: LookupCube("TMIClaim","([Measures].[Paid Amount],"+"[Transaction
Date].[Hierarchy].[Day].&[2013-01-01T00:00:00]:[Transaction Date].[Hierarchy].[Day].&[2013-02-01T00:00:00]" +"," + "[Product].[Name].&["+[TMI Product].[Name].CurrentMember.Name+"]" +")")).
It does not work as long as I put the date range. 
I cannot use Aggregate either since it does not take multiple dimensions as filter criteria. That means when I use date range for aggregate I cannot use another dimensions as filter.
I am looking for any of the solution which based filter that is combined with a date range and other dimensions.
Thanks,
Mamun

Try using the Sum() function. Something like:
LookupCube("TMIClaim","Sum( ( { "
+"[Transaction Date].[Hierarchy].[Day].&[2013-01-01T00:00:00]:[Transaction Date].[Hierarchy].[Day].&[2013-02-01T00:00:00]
}" +"," + "[Product].[Name].&["+[TMI Product].[Name].CurrentMember.Name+"]"
) ,  ([Measures].[Paid Amount]," +")
(Check location of parenthesis, but this should point you in the right direction).
This worked for me:
WITH MEMBER MEASURES.LOOKUPCUBEDEMO AS
LOOKUPCUBE("MyCube", "sum({[Date].[YQM].[Day].&[20140330]:[Date].[YQM].[Day].&[20140331]},[Measures].[Row" + " Count])")
SELECT MEASURES.LOOKUPCUBEDEMO ON 0
FROM [MyCube]
Victor Rocca

Similar Messages

  • Migrate SQL 2008 Analysis database to 2012 AS database along with data level security defined in current production cube

    I want to migrate Analysis Services 2008 database to 2012 AS database along with data level security defined in current production cube
    Note: Only Production environment have security, while no security is defined in development environment
    Potential Approach:
    1 - Using Synchronization Wizard: Gives me error : "The OLAP element at line1 can not appear under envelope......" and this is because Synchrinzation works only for same version
    and in my case, there are different versions of SQL (SQL 2008 and 2012)
    2 - Using Visual studio conversion wizard - Convert SQL 2008 AS project to 2012 and then process cube, so I can get the cube working but then how can I get data level security since 100's of data level security is defined in production Cube, so how can I
    migrate that across
    3 - Script out XMLA and deploy cube - But then again having issues with how can i script SSAS security
    4 - Would taking backup of SSAS 2008 database and restore to SSAS 2012 will help ?
    Any suggestions would be appreciated
    Thanks,
    Mihir

    Hi Mihir,
    According to your description, you want to migrate the SQL Server Analysis Services (SSAS) 2008 database which have some security setting with it to SSAS 2012, right? We can migrate existing Analysis Services databases either during Setup, by upgrading an
    existing instance of Analysis Services, or after Setup, by running the Migration Wizard. Generally, when migrating a database to another server, all the setting will be migrated. So in your scenario, you can refer to the steps on the links below to migrate
    your SSAS database.
    How to: Migrate Analysis Services Databases
    Migrating Existing Analysis Services Databases
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to show timestamp along with date in LOV dropdown

    Hi,
    We have a requirement to show timestamp along with date as a display column in a LOV drop down. Type of the date column in VVO is set to timestamp. But still it is showing only date in the UI.
    But it is showing timestamp when we run it through AM. Is there any thing in to do in addition to display it in UI? Or it is not feasible? Please suggest me on this issue.
    Thanks in advance.
    Thanks,
    Santhosh

    The date format displayed in UI depends on applcore preference set for current user, try changing date format set for current user to include time along with date.

  • Exporting USER along with data

    Hi there,
    Is it possible to export User along with data. I have 5 tables which belong to user DEVELOPER. I want to EXP this user with 5 tables.
    When I run the IMP, it errors out saying USER does not exist.
    I use like USERID=SYSTEM/MANAGER FULL=Y or I tried also with FROMUSER=DEVELOPER , TOUSER=DEVELOPER
    I can get away from this error by pre-creating DEVELOPER user but what if I have 20 users with their data.
    Is it possible that IMP will create user first and then import the data?
    I am using Oracle 9i on Windows.
    Thanks,
    Data Sheet

    Hey,
    Try the URL below -
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm#1006280
    Example to export an user using command line:
    $exp system/pasword FILE=scott.dmp OWNER=scott GRANTS=y ROWS=y COMPRESS=y
    or
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch02.htm#1005864
    Example to import an user using command line:
    $imp SYSTEM/password FILE=scott.dmp FROMUSER=scott TABLES=(dept,emp)
    I hope this can help you,
    Best Regards,
    Marcello

  • Displaying images along with data on downloading from excel

    Hi All,
    I need to show images along with data in the excel sheet when user clicks downld to excel button.  Is there possible way to show the images in excel sheet if, kindly help.
    Thanks & Regards
    Jaspreet Kaur

    Hi Vinod
    Basically I have a report which needs to be downloaded to excel sheet. For each record there is a particular image in the first column for ex say my colums are img, desc.  Now image column contains an image corresponding to each description.  If its a file, a folder image is there; if its a document, a page image is there etc.  Now i am can display the data of  text fields  in the following manner ie label =new Label(0,RowCount, wdContext.nodeVn_PortalExcel().getVn_PortalExcelElementAt(i).getVa_Role(), PortalRoleDataFormat);
    PortalReportsheet.addCell(label);
    but how do i display the image in the excel sheet?
    Is it possible to do so, if so please provide assistance.
    Thanks & Regards
    Jaspreet Kaur

  • How to export Tables along with Data and also Tables without data

    Hi All,
    I have a strange situation here. I have a 2 existing schema's under one database. Now the client wants to have 4 more schema's to incorporate the new branches of his company.
    I want to know whether is it possible for me to run an expdp command by which i can have the data from the mentioned tables and only table structure of the remaining along with remaining database objects (procedure,functions,triggers,views,sequences etc).
    Since there are some 32 Master tables, whose data i need to capture in db dump in order to run the batch under new schema and the remaining tables will be populated with data from the new branch employees hence the need is for table’s structure only.

    Hi,
    you should run two different import comand.
    The first import with only metadata, just to recreate the structure.
    With the second import you will import data only for the tables you need.
    I think this is the simplier solution.
    Acr

  • Unique file name to be decoded and to be updated in a table along with data

    Hi
    I'm working on a File to Proxy scenario, where the file names(10 chars length) are unique. These files will be available for XI in a source directory. My requirement is -- file name need to be decoded into 3 values and to be updated into a r/3 database table along with the file data.
    Hope my requirement is clear.
    Thanks.

    You cannot see the field which stores the file name. The file name comes from payload at runtime.
    Secondly no need to create any input parametes in your UDF, just edit your udf and delete the input parameter (default input is 'a') so that you don't have to map any constant to this UDF just map this UDF to target field.
    e.g. UDF ---> target Field.
    I did the same but am not able to activate the mapping.
    Mapping activation Error:
    Activation of the change list canceled Check result for Message Mapping hello_mapping | http://briks.com: 
    Mapping not sufficiently defined
    Chennai.

  • How export one table along with data from one location to other location

    Hi All,
    I'm new in export/import practice.
    Can anyone plz tell the steps along with commands to do the following:
    1. I want to export a table with data from one location(computer) to other(computer) that are in same network.
    2.Also from one user to another user.
    I'm using oracle 10g.
    regards
    Sonia
    Edited by: 983040 on Feb 19, 2013 11:35 PM

    First of all read documentation
    Oracle Export/Import : http://docs.oracle.com/cd/B19306_01/server.102/b14215/exp_imp.htm
    Datapump Export/Import : http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_overview.htm
    If you are using Datapump or Traditional Export/import you need to follow following steps
    *1) Take User dump via EXPDP on Computer A .*
    For EXP
    exp username/password owner=Test file=D:\test.dmp log=D:\test.log
    For EXPDP
    expdp username/password schemas=TEST directory=TEST_DIR dumpfile=TEST.dmp logfile=TEST.log*2) Copy that to Computer B*
    *3) Import dumpfile.*
    For IMPDP  Use remap_schema optionhttp://www.acehints.com/2012/05/data-pump-impdp-remapschema-parameter.html
    For IMP use fromuser and touser option
    one user to another user imp

  • Exporting macro along with data - BEx web

    Hi,
    I have to send BEx web data along with a macro. The purpose is every report user down loads in his desktop gets an unique macro along with the data. The user can later use that macro for further analysis of the downloaded data.
    I was reading through the How to Use Web Printing with Microsoft Excel document which details about various objects such as Packages and ABAP classes. The ABAP class ZCL_RSR_XLS_ITEM_TEMPLATE contains methods such as SET_ITEM,RENDER_DATA,LOAD_TEMPLATE_FROM_DB,GET_TEMPLATE...etc. My question is whether these class and mehtods can it be enhanced to include a macro ???
    Any suggestions is eagerly awaited,
    Regs
    D Bret

    Hi Arun,
    How do you access / write excel macros using jave scripts ? can please send me an example ? In the mean time let me explain you my requirement again...
    My end users are not happy with Web printing so they have decided to go with exporting web report an excel sheet. But once the data been collected in excel sheet many of the users wld like to have some mechanism to strip that exported excel data into multiple sheets. so that is the reason its been decided to send the generic macro to end users who exports the BEx report to an excel sheet and process it....
    thanking you in advance,
    D Bret

  • SQLLoader: Uploading data file name along with data

    I am using Oracle SQLLoader to upload my data from CSV files into a single table. My current CTL file is as follows:
    LOAD DATA
    INFILE 'trace_metals100.csv'
    INFILE 'trace_metals101.csv'
    APPEND
    INTO TABLE TRACE_METALS
    FIELDS TERMINATED BY ','
    (STATION_NO, METAL_NAME, METAL_WT)
    Just for my record I want to upload the data file name also along with the data into a fourth column. How should I do it using SQLLoader??
    Regards,
    Moiz

    Do two loads using two separate control files:
    LOAD DATA
    INFILE 'trace_metals100.csv'
    APPEND
    INTO TABLE trace_metals
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (station_no,
    metal_name,
    metal_wt,
    fourth_column_name CONSTANT trace_metals100.csv)
    LOAD DATA
    INFILE 'trace_metals101.csv'
    APPEND
    INTO TABLE trace_metals
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (station_no,
    metal_name,
    metal_wt,
    fourth_column_name CONSTANT trace_metals101.csv)

  • How to transfer control along with Data to the another page (Out of JVM)

    Hi,
    Please bear with me, incase this turns out to be a dumb question.
    I want to transfer control to a non JSP page after I hit submit. Apart from
    this I am also sending some data as a HTTPS POST. In case of using
    response.sendRedirect(), it doesn't take care of the POST data.
    So, can anybody help me with what's the best practice in sending POST
    request from a Struts (1.3.8) based J2EE application to another page (which is not a J2EE Application)
    Thank you

    Hi,
    you should run two different import comand.
    The first import with only metadata, just to recreate the structure.
    With the second import you will import data only for the tables you need.
    I think this is the simplier solution.
    Acr

  • Writing time to a file along with data

    Hello,
    I have a vi which I'm using to collect voltages.  From the data collector vi, all 8 channels are output as an array of waveforms which I then split off.  I'm splitting the channels so that I can convert the readings from volts to engineering units (inches, lbs, etc), then merging the signals back as shown in the attached jpg.  My problem is I need to have a time column on the left but I cannot figure out how to do this.  I've tried many different methods, yet as I'm still a novice, I'm sure there is something I have not tried.  I need to be able to get times in milliseconds (relative to the beginning of recording) and possibly 0.000 1 second intervals.
    Thank you in advance,
    Robbie
    Attachments:
    HSS.jpg ‏15 KB

    The time column in the LVM file is more of a convenience to spreadsheet users than anything else.  You can recreate it from the t0,dt of the waveforms the LVM read returns.  You can either use a FOR loop with the t0, dt as inputs or the ramp generation VI.  Add the result to the beginning of the array of waveforms the LVM read returns, and then save.
    If you want to be more efficient and not kill your RAM as bad, try the following method using the LVM data directly;
    Open your new file and write your header
    Open the LVM file as a normal file
    Read the LVM file and toss the data until you get to the end of the header "***End_of_Header***".
    Copy the data from the LVM file to your file directly
    The specification for the LVM file can be found here, if you want to dive into it a bit deeper.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Migrate the complete solution along with data from BW 2.x to BW 7.x

    Dear Experts,
    There is a scenario in which SAP BW 2.0 have been upgraded to 7.0 version,  while the BW flow  and the custom models  that exists are still in 2.X version
    We acquired separate SAP BW 7.4 powered by Hana ,  We would like to migrate the older version of BW i.e 7.0 with mentioned content and models into this new system with data and going forward our organization would like to have only one system and dismantle the old system  .  Please let us know the process in the form of steps as to how it can be achieved . Need your expert input on this .
    Thx,

    The below is my Proposed Solution
    •Identify the list of Models & Objects which is required Migration eg: out of 100 Cubes only in Use 70 Cubes & Reports 150
    •Migrate the models in System 1 (Old BW System)
    •Create RFC from System 1 to System 2(New BW System)
    •Transport Objects to System2
    • Load the data from System 1 to system 2 using Open Hub/datamart
    –If you have any Full load from ECC , Non SAP or Excel, no need to load the data from System 1 to System 2, you can load directly from source to system 2.
    PLease Advise.........

  • Scripts - How to define a different dimension

    Hi,
    I have  data for certain members called "concepto", these data is going to be stored in the dimension TIME but only for year. What i want to do is take this data by year and spread it to each month of the year. But also, the members of the dimension change.
    1. Concepts:  MOD, GL, MP (3 members)
    Stored for 2011
    Stored also with the following dims:  Cliente: Dummy , Concepts: Cd (Parent of the 3 concepts) , Consumibles : Consumibles, Lob: Dummy, Metrica: X, Moneda: Dummy, OI: Dummy, Tiempo: 2011, Version: Esperado_2011, Vendedor: Dummy
    2. Spreading the value for the months, calling the 3 concepts with a property (dist):
    *XDIM_MEMBERSET TIEMPO=2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021
    *WHEN CONCEPTO.DIST
    *IS "Y"
    *FOR %ANO%= %TIEMPO_SET%
    *FOR %MES%= ENE,FEB,MAR,ABR,MAY,JUN,JUL,AGO,SEP,OCT,NOV,DIC
    *REC(FACTOR=1, TIEMPO="%ANO%.%MES%")
    *NEXT
    *NEXT
    *ENDWHEN
    *COMMIT
    So far, it works perfectly, but the destination for those dims is not the right one, I'd like to change 3 dims:
    Lob: Servicios_out ,  Metrica: Importe,  Moneda: MXN.
    3. How can I define this destination?  I have tried adding FOR (each dimension) along with the FOR statements (time) but it does not work.
    Thanx in advance !!
    Velázquez

    Hi John,
    It didnt worked.
    I typed:
    *XDIM_MEMBERSET TIEMPO=2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021
    *WHEN CONCEPTOS.DIST
    *IS "Y"
    *FOR %ANO%= %TIEMPO_SET%
    *FOR %MES%= ENE,FEB,MAR,ABR,MAY,JUN,JUL,AGO,SEP,OCT,NOV,DIC
    *REC(FACTOR=1, TIEMPO="%ANO%.%MES%", Lob="Servicios_out", Metrica="importe", Moneda="mxn")
    *NEXT
    *NEXT
    *ENDWHEN
    *COMMIT
    In order to store the data in the dimensions i want and the rest of them stay as the original, i.e. Version, etc.
    It simply ignored this and stored everything in the wrong members for the dimensions.
    Any other suggestion?
    Velázquez

  • Metrics generation based on (birth) date ranges

    Hello all,
    Am a beginner in OBIEE. Am trying to derive some metrics out of birthdate information I have. Its a 2 part question.
    1) Count of occurrence of birthdates.
    Its a simple count(*) query and this I was able to get it done in OBIEE - all the formatting is done
    Eg:
    source data
    *19300203*
    *19300203*
    *18301203*
    *19600204*
    metrics out of that
    *19300203 - 2*
    *18301203 - 1*
    *19600204 - 1*
    2) Count of birthdate based on period distribution.
    Now, categorizing the date range in to 3 distributions.
    a) before 1900
    b) 1900 to 1950
    c) after 1950
    output will should be something like -
    before  1900 - 1
    *1900 to 1950 - 2*
    after 1950   - 1
    I tried a lot and searched in forums and now stuck really and could not proceed with this type of data generation model.
    Can you please show some pointers on how I can proceed with this?
    Many thanks.

    Hi,
    Bit tricky without more details of your model, but im guessing you have a date dimension and a fact with your count measure.
    I'd start in answers, create some 'Bins' on your date column or manually write a case statement to create the attribute you want to group the counts by (ie :
    when date < 1900 then 'Before 1900' else when < 1951 then '1900 to 1950' else 'after 1950)
    If your happy with this result, I'd move the case statement back into the RPD BMM layer as a logical column in your Date dimension and go from there. This way the grouping of dates is available across other reports and is not confined to a specific formula in the report you are currently working on.
    HTH, let us know if you get stuck.

Maybe you are looking for