@CURRMBRRANGE to MDX query

Hi ,
Please help me out to get the Proper MDX query ..
Below is my Essbase formula need to be converted to MDX query ..
IF(@ISMBR(Actual,Budget,Forecast))
(@SUMRANGE (A02, @CURRMBRRANGE(Period,LEV,0,-12,0)) /
(@SUMRANGE (BusPool, @CURRMBRRANGE(Period,LEV,0,-12,0))/13))*100;
ENDIF;
I have tried the below but it is showing syntax error near the LEVEL ,
(SUM(Crossjoin({[Dim Variable].[Parent Variable Id].&[69]},{
RelMemberRange(
[Dim Period].[Period ID].CurrentMember, 12,0,LEVEL)}))/
SUM(Crossjoin({[Dim Variable].[Parent Variable Id].&[363]},{
RelMemberRange(
[Dim Period].[Period ID].CurrentMember, 12, 0,LEVEL)})/13))*100
Please correct me,,
Thanks in Advance

Thanks for the Query but still i am getting problem.
I have tried what u have mentioned like this ,
WITH MEMBER [Measures].x AS
IIF(
Contains([Scenario].CurrentMember, {[Actual], [Budget], [Forecast]}),
((Sum(CrossJoin({[[Dim Variable].[Parent Variable Id].&[69]]}, {[Dim Period].[Period ID].[Period ID].CurrentMember.lag(12) : [Dim Period].[Period ID].[Period ID].CurrentMember}))
/ (Sum(CrossJoin({[[Dim Variable].[Parent Variable Id].&[363]]}, {[Dim Period].[Period ID].[Period ID].CurrentMember.lag(12) : [Dim Period].[Period ID].[Period ID].CurrentMember}))/13))*100),
MISSING
SELECT [Measures].x on 0
FROM [BusPool Cube]
but it giving the following error..
Executing the query ...
Query (3, 1) The '[Contains]' function does not exist.
Execution complete
And also tried without the IIF condition there too i am getting problem,
WITH MEMBER [Measures].x AS
Sum(CrossJoin({[A02]}, {[Dim Period].[Period ID].CurrentMember.lag(12) : [Dim Period].[Period ID].CurrentMember}))
/ (Sum(CrossJoin({[BusPool]}, {[Dim Period].[Period ID].CurrentMember.lag(12) : [Dim Period].[Period ID].CurrentMember}))/13)
SELECT [Measures].x on 0
FROM [BusPool Cube]
For this query it is executed but giving the value as #Error,as like this
x
#Error
When i keep my cursor on the #Error it shows as ,
Infinite recursion detected.The loop of dependences is x->x.
Please help me out in this ....

Similar Messages

  • Filters not getting passed in MDX query while using SAP BW with OBIEE

    Hello,
    I've been working on OBIEE with SAP BW as back-end. I've created some reports & those are working fine when there is less amount of data. But when I try to run a report with 3 dimensions & 1 fact it throws an error saying "No more storage space available for extending an internal table". When I checked MDX query, I found that the filters that I had applied to request & also selected from prompts are not getting passed in that query. So, I tried running a simple request using a simple filter in Answers. Although this request returns results but I can't see filter conditions in query. MDX query always show crossjoin but I can't see filter conditions anywhere.
    Is it the normal OBIEE behaviour OR am I doing something wrong in there? Can you please help me out with this?
    Thanks,
    Rocky

    Hello Sainath,
    We tried those things. But it is still giving same error.
    State: HY00. Code: 10058. [NQODBC][SQL_STATE:HY000][nQSError: 10058] A general error has occurred. XML/A error returned from the server: Fault code: "XMLAnalysisError.0X80000005". Fault string: "The XML for Analysis provider encountered an error: MDX result contains too many cells (more than 1 million)". (HY000)
    The problem here, I think, is the filter parameters are not getting passed in the MDX query. Any idea why would that happen? Is there any setting to do so?
    Thanks in advance for help.
    Regards,
    Rocky

  • Need help in MDX query

    Hi All 
    I am new to MDX language and need a MDX functions/query on the cube to get the required output, Given below is the scenario with the data. 
    I am maintaining the data in a table in dataMart with given structure. We have the data at day and weekly in a single table with granularity indicator and count is the measure group column. While loading the data in to mart table we are populaiting the week
    Key from week table and Month key from month table and joining in the cube.
    we need to calculate the inventory for a particular month. If a user selects a particular month the output would be count = 30 as  a measure called Closed and count = 16 as a measure value called Open.
    Need a MDX query to get output.
    Granularity  Count WeekKey MonthKey
    Weekly 16
    W1 M1
    Weekly 17
    W1 M1
    Weekly 18
    w1 M1
    Weekly 19
    W1 M1
    Weekly 20
    W1 M1
    Weekly 21
    W1 M1
    Weekly 22
    W1 M1
    Weekly 23
    w2 M1
    Weekly 24
    w2 M1
    Weekly 25
    w2 M1
    Weekly 26
    w2 M1
    Weekly 27
    w2 M1
    Weekly 28
    w2 M1
    Weekly 29
    w2 M1
    Weekly 30
    w2 M1
    Weekly 16
    w3 M1
    Weekly 17
    w3 M1
    Weekly 18
    w3 M1
    Weekly 19
    w3 M1
    Weekly 20
    w3 M1
    Weekly 21
    w3 M1
    Weekly 22
    w3 M1
    Weekly 23
    w4 M1
    Weekly 24
    w4 M1
    Weekly 25
    w4 M1
    Weekly 26
    w4 M1
    Weekly 27
    w4 M1
    Weekly 28
    w4 M1
    Weekly 29
    w4 M1
    Weekly 30
    w4 M1
    Thanks in advance

    Hi Venkatesh,
    According to your description, you need to count the members with conditions in a particular month, right?
    In MDX, we can achieve the requirement by using Count and Filter function, I have tested it on AdventureWorks cube, the sample query below is for you reference.
    with member [ConditionalCount]
    as
    count(filter([Date].[Calendar].[Month].&[2008]&[2].children,[Measures].[Internet Order Count]>50))
    select {[Measures].[Internet Order Count],[ConditionalCount]} on 0,
    [Date].[Calendar].[Date].members on 1
    from
    (select [Date].[Calendar].[Month].&[2008]&[2] on 0 from
    [Adventure Works]
    Reference
    http://msdn.microsoft.com/en-us/library/ms144823.aspx
    http://msdn.microsoft.com/en-us/library/ms146037.aspx
    If this is not what you want, please elaborate your requirement, such as the detail structure of your cube, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • SSRS report with tabular model – MDX query CoalesceEmpty function does not return the provided string value

    Hello everyone,
    I created following calculated member in MDX query. I am using it in one of the report parameter in dataset (single select dropdown list as report parameter).
    WITH MEMBER [Measures].[ParameterCaption] AS
    CoalesceEmpty([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION,'None')
    I would like to display 'None' text at the top of the dropdown list values. So that when user selects 'None' then this parameter will not considered in MDX query else the selected National Account Code will be considered to filter report data. But,
    the above return blank/empty value for  [Customer].[National Account Code].&  member though I specified 'None' as text in CoalesceEmpty function. Any advice would be appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hi Ankit,
    It seems that you issue had been solved in your another thread.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5a5becac-226f-428a-95b0-aaaa22733818/ssrs-report-with-tabular-model-create-a-dropdown-report-parameter-with-none-option-as-the-top?forum=sqlanalysisservices#0e51bf8c-a66c-4df5-a244-0147728fdfdb
    iif([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION="","None",[Customer].[National
    Account Code].CURRENTMEMBER.MEMBER_CAPTION)
    I marked this reply as answer, it will benefit to other members who have the similar issue.
    Regards,
    Charlie Liao
    TechNet Community Support

  • SSRS report with cube – MDX query how to get an extra row with value '0'.

    Hello everyone,
    I'm unable to write the MDX query to get '0' value as first row in output. Following is my MDX query:
    WITH MEMBER [Measures].[Dummy] AS   '0'
    SELECT NON EMPTY Union( {[Measures].[Amount] },{[Measures].[Dummy]}) ON COLUMNS,
    NON EMPTY  { ([Customer].[Customer Nbr].[Customer Nbr].ALLMEMBERS * [Fiscal].[Year].[Year].ALLMEMBERS ) }
    having  [Measures].[Amount] > 5000
    ON ROWS FROM [cube]
    With above query, the output returns the value '0' as a separate column.
    I would like to get it in form of first row for [Measures].[Amount]. Like,
    Amount
    0
    500
    200
    100
    What needs to be changed to achieve the above result? I'm planning to use the above value in line chart to start the line from 0th value as described in following URL. (Note: The below URL is using SQL query and not MDX expressions.)
    http://spinerain.blogspot.in/2013/09/ssrs-line-chart-create-stacked-line-and.html
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    The round brackets in your expression are forcing an implicit crossjoin between the 3 lines. I would do the following which creates a set of the DummyYear plus the real year members and then crossjoin that with the customer set.
    WITH MEMBER [Fiscal].[Year].DummyYear AS   '0'
    SELECT NON EMPTY {[Measures].[Amount]} ON COLUMNS,
     NON EMPTY  {[Fiscal].[Year].DummyYear,
         [Fiscal].[Year].[Year].MEMBERS} *
                [Customer].[Customer Nbr].[Customer Nbr].MEMBERS
     having  [Measures].[Amount] > 5000
    ON ROWS FROM [cube]
    http://darren.gosbell.com - please mark correct answers

  • How to union results from 3 different dimensions in where clause with or - Mdx query

    Hi 
    I have a MDX Query and i need to pass the variable values to it by dynamically.
    Each time it will get any one attribute from three dimensions.
    Select 
    {} ON Columns,
    {} ON Rows 
    From
    Cube
    Where
    [Dimension1].[Attribut].&[Value]
    or
    [Dimension2].[Attribut2].&[Value]
    or
    [Dimension3].[Attribut3].&[Value]
    So It is working for two different values by using union and cross join.
    Can you please provide the solution ..
    Thanks in advance

    Hi Philip
    Thanks for replying me.
    I tried on that way, In my mdx query i am using one slice attribute (i.e [Customer].[Gender].allmembers) in rows so getting error "The  Hierarchy already appears in Axis1".
    SELECT
    {[Measures].[Internet Sales Amount] } ON 0,
    NON EMPTY
    {[Customer].[Gender].allmembers } ON 1 -- Used
    FROM
    [Adventure Works]
    WHERE
    [Customer].[Gender].&[M]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].&[XL]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].&[Australia]
    Can you provide alternate ways to get resolved.
    Thanks in advance

  • How to get the child data in MDX query?

    I have an MDX query that will return the data for an OLAP report. These report data include the parent_id, child_id and some dimensions data in it. How do I modify the MDX query to have a New member to show a dimension value of the child_id.
    The child_is is actually the parent_id on another row. It is the "Pstpd Decision" I want to be included in a new column using the "Appeal Id". Thanks
    WITH MEMBER [Measures].[Avg TA Time] AS [Measures].[Turn Around Time]/[Measures].[Number of Request]
    SELECT NON EMPTY { [Measures].[Number of Request] } ON COLUMNS,
    NON EMPTY { ([Request Date Time].[FY-AP].[Account Period].ALLMEMBERS *
    [Request Drugs].[Drug Generic Name].[Drug Generic Name].ALLMEMBERS *
    [Dispensary].[Dispensary Hierarchy].[Dispensary].ALLMEMBERS *
    [Disease].[Tumour Group Site].[Tumour Group Site].ALLMEMBERS *
    [Disease].[Tumour Group Sub Site].[Tumour Group Sub Site].ALLMEMBERS *
    [Patient].[Patient Agency ID].[Patient Agency ID].ALLMEMBERS *
    [Pstpd Decision].[Decision].[Decision].ALLMEMBERS *
    [Request].[Request Id Key].[Request Id Key].ALLMEMBERS *
    [Request].[Appeal Id].[Appeal Id].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM ( SELECT ( { [Appeal Yes No].[Status].&[Yes] } ) ON COLUMNS
    FROM ( SELECT ( STRTOSET(@RequestDateTimeFiscalYear, CONSTRAINED) ) ON COLUMNS
    FROM [CAP Request])) WHERE ( IIF( STRTOSET(@RequestDateTimeFiscalYear, CONSTRAINED).Count = 1, STRTOSET(@RequestDateTimeFiscalYear, CONSTRAINED), [Request Date Time].[Fiscal Year].currentmember ), [Appeal Yes No].[Status].&[Yes] ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
    data. 
    Kahlua

    I got it to work by adding the child_id's "decison' to the fact table as it is alot easier to get that data using Sql Script while creating the fact table and also there is already a "decsion" dimension setup. In the cube I can select the
    parent_id's decision and/or child_id's decision. It is working on the report. Thanks.
    Kahlua

  • Bw publish and connections not based on the sap bw mdx query driver

    Dear experts,
    we are currently facing a problem with transporting reports that are based on multiple database connections and joined using the cross database join feature of crystal reports. One connection is based on the SAP BW MDX driver, the other is based on a SAP functionmodule.
    Now when transporting the reports with STMS and publishing them via /crystal/rptadmin and bwpublish only the bex mdx query connection gets updated. The other connection is still pointing to the original location.
    e.g.
    transporting
    DEV -> PROD
    function module still pointing on dev server.
    As we need to use the sap default transport system in order to get all features (no SP4 yet) and we can not change the reports manually in the PROD system before publishnig and don't want to mix in the LCM we have no idea how get a work around for this problem.
    Changing the database connection via CMC on the PROD system has no effect either.
    Please help.
    Thank you very much!
    Thorsten

    Hello Thorsten,
    What you observe is "By Design" of the product. The dynamic update is supported only for reports using the BW MDX driver (or historically for those using the deprecated BW query driver). Other SAP drivers such as the OpenSQL driver which you use to connect to the function module do not leverage the same features when using the SAP Transport process.
    You may report directly against your target system when connecting to Function Modules.
    thanks,
    Akin

  • Need MDX query to find something like date diff and Date Range for last 10 days

    Hi ,
    I need two Query .First Query for below;
    I have below data in table like.
    Cat      StartDate    EndDate     
    A    2000-01-01     2000-01-15   
    B    2000-01-02     2000-01-30    
    C    2000-01-01     2000-01-31    
    D    2000-02-01     2000-02-28    
    A    2000-01-10     2000-01-31    
    I need if Startdate and Date completes whole one month then set status =1 else  0 using MDX query.
    like this ;
    Cat      StartDate    EndDate       Status
    A    2000-01-01     2000-01-15    1
    B    2000-01-02     2000-01-30    0
    C    2000-01-01     2000-01-31    1
    D    2000-02-01     2000-02-28    1
    A    2000-01-10     2000-01-31    1
    In second query I need last 10 days from current days like;
    Now = 8/20/2014
    output will be ;
    8/20/2014
    8/19/2014
    8/18/2014
    8/17/2014
    8/16/2014
    8/15/2014
    8/14/2014
    8/13/2014
    8/12/2014
    8/11/2014
    8/10/2014
    Please help me .
    Thanks

    Hi Prajapati,
    In your scenario, you can use Properties and Datediff function to achieve your requirement. Since not know the structure of your cube, we cannot give you the esact query.
     I have tested it on the AdventureWorks cube, the query below is for you reference.
    WITH MEMBER [Measures].[StartDate]
    AS
    [Employee].[Employee Department].CURRENTMEMBER.PROPERTIES('Start Date')
    MEMBER [Measures].[WorkYear]
    AS
    DATEDIFF('yyyy',[Measures].[StartDate],NOW())
    MEMBER [Measures].[Status]
    AS
    IIF(DATEDIFF('yyyy',[Measures].[StartDate],NOW())>10,1,0)
    SELECT {[Measures].[StartDate],[Measures].[WorkYear],[Measures].[Status]} ON 0,
    [Employee].[Employee Department].[Employee].MEMBERS ON 1
    FROM [Adventure Works]
    Results
    Reference
    http://msdn.microsoft.com/en-us/library/ms144821.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • When using TODATE function MDX query is not correctly generated

    Essbase 9.3.1.2 and OBIEE 10.1.3.4.1.
    When using TODATE function MDX query is not correctly generated.
    This leads to unexpected values not only on cumulative columns in report (generated with TODATE), but also other columns (calculated with AGO function or directly read from cube) have incorrect values.
    The problem occurs when you filter on a column that is not in the select list. If you filter on just one level of dimension, results are fine. You can filter on multiple dimensions as long as you filter on just one level of each dimension.
    If you filter on two or more levels of one dimension, than results are not correct. In some cases results for TODATE column are all zeros, in some cases it is a random value returned by Essbase (same random value for all rows of that column), and in some cases BI Server returns an error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. Essbase Error: Network error [10054]: Cannot Send Data (HY000).
    Here is generated MDX code:
    With
    set [Grupe proizvoda2] as '{[Grupe proizvoda].[N4]}'
    set [Grupe proizvoda4] as 'Generate([Grupe proizvoda2], Descendants([Grupe proizvoda].currentmember, [Grupe proizvoda].Generations(4), leaves))'
    set [Segmentacija2] as '{[Segmentacija].[RETAIL]}'
    set [Segmentacija4] as 'Filter(Generate({[Segmentacija2]}, Descendants([Segmentacija].currentmember, [Segmentacija].Generations(4),SELF), ALL), ([Segmentacija].CurrentMember IS [Segmentacija].[AFFLUENT]))'
    set [Vrijeme3] as '{[Vrijeme].[MJESEC_4_2009]}'
    member [Segmentacija].[SegmentacijaCustomGroup]as 'Sum([Segmentacija4])', SOLVE_ORDER = AGGREGATION_SOLVEORDER
    member [Accounts].[MS1] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],2,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS2] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],1,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS3] as 'AGGREGATE({PeriodsToDate([Vrijeme].[Gen2,Vrijeme],[Vrijeme].currentmember)}, [Accounts].[Trosak kapitala])'
    select
    { [Accounts].[Trosak kapitala],
    [Accounts].[MS1],
    [Accounts].[MS2],
    [Accounts].[MS3]
    } on columns,
    NON EMPTY {crossjoin ({[Grupe proizvoda4]},{[Vrijeme3]})} properties ANCESTOR_NAMES, GEN_NUMBER on rows
    from [NISE.NISE]
    where ([Segmentacija].[SegmentacijaCustomGroup])
    If you remove part with TODATE function, the results are fine. If you leave TODATE function, OBIEE returns an error mentioned above. If you manually modify variable SOLVE_ORDER and set value to, for example, 100 instead of AGGREGATION_SOLVEORDER, results are OK.
    In all cases when this variable was modified in generated MDX, and query manually executed on Essabse, results were OK. This variable seems to be the possible problem.

    Hi,
    Version is
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Sorry, in my last post i forgot to mention that i already created a function based index but still it is not using because, there is a UNIQUE constraint on that column.
    Thanks

  • SSRS report with tabular model – MDX query how to get the sum and count of measure and dimension respectively.

    Hello everyone,
    I am using the following MDX query on one of my SSRS report.
    SELECT NON EMPTY { [Measures].[Days Outstanding], [Measures].[Amt] } ON COLUMNS,
    NON EMPTY { ([Customer].[Customer].[Customer Key].ALLMEMBERS) }
    HAVING [Measures].[ Days Outstanding] > 60
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM ( SELECT ( STRTOSET(@Location, CONSTRAINED)) ON COLUMNS
    FROM ( SELECT ( {[Date].[Fiscal Period].&[2014-06]}) ON COLUMNS
    FROM [Model]))
    Over here, the data is being filtered always for current month and for a location that is being selected by user from a report selection parameter.
    I would like to get the count of total no. of customers and sum of the amount measure.
    When I am using them in calculated members it gives incorrect values. It considers all records (ignores the sub-select statements) instead of only the records of current month and selected location.
    I also tried with EXISTING keyword in calculated members but there is not difference in output. Finally, I manage the same at SSRS level.
    Can anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
    Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
    Any help would be much appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Can anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
    Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
    Hi Ankit,
    We can use SUM function and COUNT function to sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension. Here is a sample query for you reference.
    WITH MEMBER [measures].[SumValue] AS
    SUM([Customer].[Customer].ALLMEMBERS,[Measures].[Internet Sales Amount])
    MEMBER [measures].[CountValue] AS
    COUNT([Customer].[Customer].ALLMEMBERS)
    MEMBER [Measures].[DimensionName] AS [Customer].NAME
    SELECT {[Measures].[DimensionName],[measures].[SumValue],[measures].[CountValue]} ON 0
    FROM [Adventure Works]
    Besides, you ask that does it make any difference if I manage it as SSRS level and not at MDX query level. I don't thinks it will make much difference. The total time to generate a reporting server report (RDL) can be divided into 3 elements:Time to retrieve
    the data (TimeDataRetrieval);Time to process the report (TimeProcessing);Time to render the report (TimeRendering). If you manage it on MDX query level, then the TimeDataRetrieval might a little longer. If you manage it on report level, then the TimeProcessing
    or TimeRendering time might a little longer. You can test it on you report with following query: 
    SELECT Itempath, TimeStart,TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
    TimeDataRetrieval, TimeProcessing, TimeRendering, ByteCount, [RowCount],Source
    FROM ExecutionLog3
    WHERE itempath like '%reportname'
    Regards,
    Charlie Liao
    TechNet Community Support

  • SSAS Tabular : MDX query goes OutOfMemory for a larger dataset

    Hello all,
    I am using SSAS 2012 Tabular to build the cube to support the organizational reporting requirements. Right now the server is Windows 2008 x64 with 16GB of Ram installed. I have the following MDX query. What this query does is get the member caption of the
    “OrderGroupNumber” non-key attribute as a measure where order group numbers pertain to a specific day and which occurs in specific seconds of a day. As I want to find in which second I have order group numbers, I cross the time dimension’s members with a specific
    day and filter the tuples using the transaction count. The transaction count is a non-zero value if an Order Group Number occurs within a specific second of a selected day.
    At present “TransactionsInflight].[OrderGroupNumber].[OrderGroupNumber]” has 170+ million members (Potentially this could grow rapidly) and time dimension has 86400 members.
    WITH
    MEMBER [Measures].[OrderGroupNumber]
    AS IIF([Measures].[Transaction Count] > 0, [TransactionsInflight].[OrderGroupNumber].CURRENTMEMBER.MEMBER_CAPTION,
    NULL)
    SELECT
    NON EMPTY{[TransactionsInflight].[OrderGroupNumber].[OrderGroupNumber].MEMBERS}
    ON COLUMNS,
    {FILTER(([Date].[Calendar Hierarchy].[Date].&[2012-07-05T00:00:00], [Time].[Time].[Time].MEMBERS),
    [Measures].[Transaction Count] > 0) } ON
    ROWS
    FROM [OrgDataCube]
    WHERE [Measures].[OrderGroupNumber]
    After I run this query it reaches to a dead-end and freezes the server (Sometimes SSAS server throws OutOfMemory exception but sometimes it does not). Even though I have 16GB of memory it uses all the memory and doing nothing. I have to do a hard-reset against
    the server to get the server online. Even I limit the time members using the “:” range operator still the machine freeze. I have run out of solutions to fine-tune the design. Could you guys provide me some guidelines to optimize this query? I am willing to
    do a design change if it is necessary.
    Thanks and best regards,
    Chandima

    Hi Greg,
    Finally I found the problem why the query goes out of memory in tabular mode. I guess this information will helpful for others and I am posting my findings.
    Some of the non-key attribute columns in the tabular model tables (mainly the tables which form dimensions) do not contain pretty names. So for the non-key attribute columns which I need to provide pretty names I renamed the columns to something else.
    For an example, in my date dimension there is a non-key attribute named “DateAltKey”. This is the date column which I am using. As this is not pretty to the client tools I renamed this column as “Date” inside the designer (Dimension
    design screen). I deployed the cube, processed the cube and no problem.
    Now here comes the fun part. For every table, inside the Tables node (Tabular SSAS Database > Tables) you can view the partition details. You have single partition per dimension table if you do not create extra partitions. I opened the partitions screen
    and clicked on the “Edit” icon and performed a Syntax Check. Surprisingly it failed. It complains about the renamed column. It complained “Date” cannot be found in source. So I realized that I cannot simply rename the columns like that.
    After that I created calculated columns (with a pretty name) for all the columns which complained and all the source columns to the calculated columns were hid from the client tools. I deployed the cube, processed the cube and performed a
    syntax check. No errors and everything were perfect.
    I ran the query which gave me trouble and guess what... it executed within 5 seconds. My problem is solved. I really do not know who did this improve the performance but the trick worked for me.
    Thanks a lot for your support.
    Chandima

  • How can ew add filter in Dataset of MDX Query

    Hi,
    I am working on TFS 2010 Report with Report Builder 3.0
    I need to fetch data on basis of Start Task Date(means when user start their task).
    So i have added a new field in a TFS Work Item Template with name StartTaskDate.
    Now i need to fetch the report FromTaskDate to TOTaskDate(Date Range Filter).
    so how can we do this with filter option?
    Can any body help me on this.
    Thanks

    Hi rohitnegi09,
    If you want @FromTaskDate and @TOTaskDate parameters are Date/Time data types, please refer to my last reply in the following thread:
    http://social.technet.microsoft.com/Forums/en-US/db75abb9-2250-463a-8ef3-70426f617329/mdx-report-on-date-range?forum=sqlreportingservices
    If you want @FromTaskDate and @TOTaskDate parameters are Text data types, we can directly type the following MDX query in the dataset:
    select
    {[Measures].[Internet Sales Amount]
    } on columns,
    {[Date].[Date].members} on rows
    from(
    select
    STRTOMEMBER("[Date].[Date].&["+@FromTaskDate+"]"):STRTOMEMBER("[Date].[Date].&["+@ToTaskDate+"]")
    ) on columns
    from [Adventure Works]
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Getting the MDX query select error when running a webi report on BI query

    Getting the following error when running a webi report on BI query :
    A database error occured. The database error text is: The MDX query SELECT  { [Measures].[D8JBFK099LLUVNLO7JY49FJKU] }  ON COLUMNS , NON EMPTY [ZCOMPCODE].[LEVEL01].MEMBERS ON ROWS FROM [ZTEST_CUB/REP_20100723200521]  failed to execute with the error Unknown error. (WIS 10901).
    I have gone through many threads related to this error. But not able find the steps to follow for resoultion.
    Please help in this regard.
    Thanks,
    Jeethender

    The Fix Pack is also for Client Tools--it is a separate download.  Please see the text below for ADAPT01255422
    ADAPT01255422
    Description:
    Web Intelligence generates an incorrect MDX statement when a characteristic and a prompt are used.
    The following database error happens: "The MDX query ... failed to execute with the error
    Unknown error (WIS 10901)."
    New Behavior:
    This problem is resolved.
    This information is also available in the Fixed Issues document for any Fix Pack greater than 2.2.

  • Filter issue in MDX query leaving some values empty!

    Hi all,
    In short: I have a report with multiple values such as name of shop, postal code etc. The parameters have no default value and act as "like". If someone enters "krant" he'll get all the shop names that contain "krant" in their
    name etc. 
    Same goes for postal code, if someone enters 2550 he'll get all data for 2550. The problem although is that if a user start with postal code as parameters and leaves the shop name empty, the shop name is not shown in my report! The other way around it works,
    when I enter shop name i'll get all shops + postal code in my report.
    I know this is because POS name cannot be shown in report because it's left blank, but I want my MDX query to be able to give me the POS names even if I only enter postal code.
    Can someone please please look at my query below? I need to add 4 more parameters this way later on too!
    SELECT 
    [Measures].[Sales amount]
     ON COLUMNS, NON EMPTY
    Filter(
                                   [Point of sale].[POS name].AllMembers,
                                   InStr(
                                                   [Point of sale].[POS name].CurrentMember.MEMBER_CAPTION,
                                                   @PAR_POSName
                                   ) > 0
    *Filter(
                                   [Point of sale].[POS postal code].AllMembers,
                                   InStr(
                                                   [Point of sale].[POS postal code].CurrentMember.MEMBER_CAPTION,
                                                  @PAR_POSTAL_CODE
                                   ) > 0
    *[Point of sale].[Client id].[Client id]
    *[Point of sale].[POS id].[POS id]
    *[Point of sale].[POS street].[POS street]
    *[Point of sale].[POS town].[POS town]
    *[Point of sale].[POS housenumber].[POS housenumber]
    ON ROWS
    FROM [mycube]

    Hi Yvanlathem,
    Have you create the parameters in the MDX Query Designer? I haved tested it on my local environment (Microsoft SQL Server 2012 (SP1) - 11.0.3401.0 (X64) Enterprise Edition (64-bit)), we cannot reproduce this issue.
    with
    set subset1
    as
    filter ([Geography].[Geography].[Country].members,
    instr([Geography].[Geography].currentmember.name,@name)>0
    select {} on 0,
    subset1 on 1
    from
    [Adventure Works]
    Reference
    Define Parameters in the MDX Query Designer for Analysis Services (Report Builder and SSRS)
    Regards,
    Charlie Liao
    TechNet Community Support

Maybe you are looking for

  • Running custom webservice on Oracle 10.1.3.0 AS of Oracle eBS

    Rapid Install installs Oracle AS 10.1.3.0 as part of Oracle e-Business Suite R12. My question is: Is it possible to deploy webservices build in JDeveloper to this application server? Iam not talking about BPEL, just a custom build webservice or a web

  • Problem With Plotting a graph

    Hi, I need help plotting a graph. The situation is .... I have data of speed against time. Data is like this : a truck runs at some speed until 10 o clock. Now the driver changes time of the speed vs. time tracking device back to 9 o clock. Now if I

  • Saving GOS attachment

    hi, Our client is using 4.6c system. I want to download PO attachment with GOS functionality. I tried using FM BDS_GOS_CONNECTIONS_GET in 4.6c system. But this FM is not present in 4.6c System. Is there any other way of downloading PO attachment with

  • Strange text on many pages

    i recently adjusted the text encoding settings within safari and now i'm experiencing some strange text on webpages. it will display some regular/normal text and it will also display other text as pictures (like wingdings). fyi - i adjusted to UTF-8

  • Application manager shows apps that are not installed as Up-to-date

    Flash and Premier pro not on my computer, application manager says they are Up-to-date Edge Animate is in the applicationfolder, AppManager asks me to install ... Did a restart of the computer, did try an uninstall but the applications don't show, di