Tabular model with Direct Query issue

Hi,
i am creating a tabular model - Direct Query option. I am using a kind of below query to import data,
Declare @TEST as Table (TestID int, TestName varchar(20))
Insert into @TEST
Select 1, 'TEst1' Union
Select 2, 'TEst2'
Select * from @TEST
But the Import fails with an error similar to below,
OLE DB or ODBC error.  An error occurred while processing the partition 'Query_``````````' in table 'Query_````````'.  The current operation was cancelled because another operation in the transaction failed.
Any idea, why it is failing ? or is it like we shouldn't use declare statement in the Query area ?
Please reply ...Thanks in advance !
--------------------------- Radhai Krish | Golden Age is no more far | --------------------------

I'm pretty sure that the query would have to be a single statement so the declare statement would be causing issues.
So just doing this as a single union query should work:
Select 1 as TestID, 'TEst1' as TestName Union
Select 2, 'TEst2'
http://darren.gosbell.com - please mark correct answers

Similar Messages

  • Error in import : tabular model with Oracle

    Hi there,
    I seems to be getting very strange error.
    I am trying to build tabular model over oracle db. I get test successfull for connection, able to validate the query, and in query designer, if i execute it shows me data too. But when i press finish, it gives me error while importing.
    ERROR from import screen
    OLE DB or ODBC error: ORA-01033: ORACLE initialization or shutdown in progress.
    A connection could not be made to the data source with the DataSourceID of '8ffdbfd9-e21f-442d-9040-b66dc074c87d', Name of 'XXXXXXX'.
    An error occurred while processing the partition 'XXX_3fc019fa-4d1a-4d39-9317-3dcde3297579' in table 'XXXXXX'.
    The current operation was cancelled because another operation in the transaction failed.
    I cant figure this out,Even in Execl powerpivot i am able to pull the data in.
    Any idea..TIA
    Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/

    Hi Rahul,
    Based on my research, for the error “OLE DB or ODBC error: ORA-01033: ORACLE initialization or shutdown in progress.
    A connection could not be made to the data source with the DataSourceID of '8ffdbfd9-e21f-442d-9040-b66dc074c87d', Name of 'XXXXXXX'.”
    It seems that it related to Oracle database, here are some links about how to troubleshoot this issue, please see:
    ERROR - ORA-01033 oracle initialization or shutdown in progress
    ERROR - ORA-01033 oracle initialization or shutdown in progress
    If the issue persists, since I am not an expert on Oracle database, you can post the question on the Oracle forum, so that you can get more help.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Case-sensitive values in an Tabular Model with a Oracle Datasource

    Hi,Lets use an Oracle Database as Datasource for my Project. I use a "Select distinct ColumnA from Table" to build up a LookupTable in my Tabular Model. But it returns Dublicates!! eg:
    When I fire the query from Oracle SQL Developer I got 2 Records "1N" and "1n". In the Grid View in SSDT I see 2 times "1N". ??
    Collation Case Sensitive. OK, but how to solve that?
    KR

    Hi KR,
    According to your description, you encounter the case-sensitive issue when creating SQL Server Analysis Services Tabular model project, right?
    Based on my research, Tabular models have the insensitivity problem by default. The workaround for this issue is creating a empty tabular model in tabular server using the xmla below and import the tabular in SSDT.
    <Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
    <ObjectDefinition>
    <Database xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
    <ID>Collation test</ID>
    <Name>Collation test</Name>
    <Language>1033</Language>
    <Collation>Latin1_General_CS_AS</Collation>
    <DataSourceImpersonationInfo>
    <ImpersonationMode>Default</ImpersonationMode>
    </DataSourceImpersonationInfo>
    <ddl200_200:StorageEngineUsed>InMemory</ddl200_200:StorageEngineUsed>
    <ddl200:CompatibilityLevel>1100</ddl200:CompatibilityLevel>
    </Database>
    </ObjectDefinition>
    </Create>
    For the detail information about it, please refer to the link below.
    http://blogs.msdn.com/b/cathyk/archive/2011/10/24/making-tabular-models-more-sensitive.aspx
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • With clause query issue in oracle cloud script editor

    When I am running this query in SQL Workshop > SQL Commands window then its working fine
    with cte as (select * from emp)
    select * from cte
    where deptno = (select deptno from dept where loc = 'DALLAS')
    but its give me error in SQL Workshop > Script Editor window
    When I did copy & paste query from Script Editor window to notepad,
    then I realize that its automatically adding hidden "?" question mark (as per below query)
    how can I resolve this issue?
    please guide me.
    I have confirm that there is no any white space after 'DALLAS')
    & another simple queries working fine in both windows.
    with cte as (select * from emp)
    select * from cte
    where deptno = (select deptno from dept where loc = 'DALLAS')?
    Edited by: Sanjay on 28 Mar, 2013 6:46 PM

    Hi Sanjay,
    You have mentioned "+but its give me error in SQL Workshop > Script Editor window+" - are you referring to the SQL Workshop > SQL Scripts > Script Editor option, while editing a SQL script? If so, then I have been unable to reproduce the behaviour you have reported, and have not received any errors using your test query.
    To assist in identifying the cause of your problem, could you please outline the exact steps that you followed, leading up to the step where you receive an error?
    Regards,
    Hilary

  • What will be physical architecture for SSAS Tabular model with Sharepoint 2013?

    I would like to build SharePoint 2013 based reporting portal with Power View as visualization tool.
    I have 300-800 million rows and customer puts priorities in high performance.
    Data source is SQL Server database and Flat Files.
    What will be recommended physical archicture? Is following good?
    -SQL Server database server
    -SSAS Tabular application server
    -SharePoint 2013 Front-End (multiple if needed)
    Kenny_I

    Hi Kenny_I,
    According to your description, you want to if it's OK to SQL Server database server, SSAS tabular application server and SharePoint 2013 Front-End on different server, right?
    As I said in another thread, even though we can install all of them on same physical server, however in the production environment, the recommendation is that install them on different server, it will beneficial to troubleshooting the issue when some
    issue occur on the environment. So in your scenario, it Ok to install all the application on different server. Here are some links about requirement to install the application.
    System requirements for Power View
    Hardware
    Sizing a Tabular Solution (SQL Server Analysis Services)
    If I have anything misunderstood, please point it out.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Sort GridControl modeled with parameterized query (bug?)

    I am using JDev 3.2.3. I created a ViewObject in expert mode which contained a parameterized query:
    select emp_name, salary
    from employees
    where
    dept_no = :1
    Then, through a few workarounds, I managed to create a BC4J data form containing a GridControl linked to the ViewObject.
    Cleared the associated empsRowSetInfo.queryOnOpen(false).
    Created a button with action event:
    empsRowSetInfo.setQueryConditionParams(new Object[] {
    deptId
    empsRowSetInfo.executeQuery();
    This all works fine.
    ***The problem***
    If you press on a header to re-sort the grid, a bad sql query error is thrown and details shows the following bad query:
    select * from (
    select emp_name, salary
    from employees
    where
    dept_no = :1)
    order by asc emp_name
    ORA-00904: invalid column name
    The GridControl headers appear to be getting their own copy of the ViewObject's query, then misinterpretting it. This works fine for non-parameterized queries since the column names are explicit. However :1 is not a column name but a place holder in my parameterized query.
    Shouldn't the headers be using the same mechanism to sort the grid as used to populate the grid model originally?
    Any suggestions for a workaround? Pressing a column header fatally breaks the form. Pressing the button again to re-execute the original query continues to throw the error!
    Thanks,

    This is clearly a bug.
    DAC is in 9.0.2 + replaced by JClient.
    It might be hard to get a fix for this problem.
    As far as a workaround.
    You can provide your own SortDelegate.
    Start with diagnosing the problem by extracting the SortDelegate class out of 'dacf-src.zip'.
    Change it into a mySortDelegate.java.
    Set the sortDelegate property on the gridControl. (use an instance of mySortDelegate).
    You should be able to step into your implementation and see what the problem is.
    Hopefully you will be able to fix the problem in your sortDelegate class.

  • SSAS Tabular Model and browse with MS Excel 2013

    I have a tabular model, It has an attribute with datatype and data format as "whole number". When I browse the model from excel and add label filter, it
    does not work as expected.
    When I specify greater than 180 as label filter, It gives following output:
    My guess is that it is just filtering on first two digits "18" and not "180". When I copy these values in a excel sheet and create pivot table on top of it, hell it works fine.
    Is this a microsoft bug? have you encountered something like this or I am doing some thing wrong?
    I am using tabular model 2012 and excel 2013 or 2010.
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

    Hi Itz,
    According to your description, the filter not works fine in excel for a SQL Server Analysis Services Tabular models, right?
    I have tested it on the local environment, we cannot reproduce this issue. As per my understanding, this issue is related to the settings of your tabular model. Does this issue can be reproduce in multiple servers in your environment? In that is
    case, from a support perspective this is really beyond what we can do here in the forums. If you cannot determine your answer here or on your own, consider opening a support case with Microsoft. Visit this link to see the various support options that are available
    to better meet your needs:
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Besides, if you consider this issue is a bug, you can submit a feedback at
    http://connect.microsoft.com/SQLServer/Feedback Microsoft will confirm if this issue is a bug or not. 
    Regards,
    Charlie Liao
    TechNet Community Support

  • MDX query on Tabular Model

    Hi,
    I am very new to SSAS Tabular model and MDX query so I need some help in getting correct query.
    I am trying to build a query against a Tabular Model but not sure how to build the query.
    I have a Db called 'MyClient' in Analysis Services database. This db has Tables like 'Observations','Scan' etc.
    In table I have around 10 to 12 columns like 'Id','ScanId','Title','Date','Impact' etc.. What I am looking for is a MDX query to reterive all the information from Observations table filtered on ScanID? Can someone provide me with a query
    If SQL I could have written Select * from Observations where ScanID='22qwe-adfad-12322-adfsdf'.

    Hello,
    Is "Observation" a fact table or a dimension? In MDX it is not common to query a "detailed list", mostly you query aggregations; but you can query data from a diminsion. Here is an example for the "AdventureWorks" cube with dimension "Customers":
    SELECT {} ON 0
    { [Customer].[Customer].[Customer]
    * [Customer].[Gender].[Gender]
    * [Customer].[Marital Status].[Marital Status] } ON 1
    FROM $Customer
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Performance testing of Tabular model

    I have Power View on SharePoint 2013 on tabular model.
    How to test performance of tabular model with SQL Server tools or equivalents?
    Kenny_I

    Hi Kenny_I,
    According to your description, you want to test the performance of tabular model with SQL Server tools, right? In this case, we can use SQL Profiler to achieve your requirement. Here is a blog which describes using SQL Server to Analyze Analysis Services
    Profiler Traces from Tabular Models, please refer to the link below to see the details.
    http://blogs.msdn.com/b/johndesch/archive/2014/06/27/using-sql-server-to-analyze-analysis-services-profiler-traces-from-tabular-models.aspx
    Besides, here is a similar thread for you reference.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/649c11a5-b771-4153-b609-e8754d29a9ad/tracing-and-monitoring-mdx-query-against-a-ssas-tabular-model-ssas-2012?forum=sqlanalysisservices
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Change PowerView datasource from PowerPivot to SSAS Tabular model

    Hi all,
    I'm playing around with PowerView at the moment and use the PowerView examples provided by Microsoft. These are all based on PowerPivot with data from an access DB. Now I want to have the sample data not stored locally but on the server. What I did so far
    was importing the PowerPivot into a SSAS Tabular Model (with the VS wizard) and published the model to the SSAS Server. So far so good, I can browse the data in the model. 
    However, I have not found a possibility to change the data source of the PowerView from PowerPivot to the SSAS Tabular Model. How can I do this? Or is this not possible?
    Thanks,
    Pascal

    Hi Pascal,
    Power View only supports Microsoft BI Semantic Model (BISM) for Power View data sources. BISM files are designed specifically for connecting to Excel workbooks and SSAS tabular models. The Excel workbooks can be in the PowerPivot Gallery on a SharePoint
    site or in a SharePoint library. In this issue, you can publish the PowerPivot workbooks to a SharePoint library or the PowerPivot Gallery, and then create RSDS file or BISM data source to the workbooks. Here are the connection string samples:
    An Excel workbook in Shared Documents on a SharePoint site:
    Data Source=”http://<SharePointSite>/Shared Documents/MyExcelWorkbook.xlsx”
    An Excel workbook in the PowerPivot Gallery on a SharePoint site:
    Data Source=”http://<SharePointSite>/PowerPivot Gallery/MyExcelWorkbook.xlsx”
    Reference:
    http://office.microsoft.com/en-us/excel-help/create-a-connection-to-a-data-model-for-power-view-HA102835737.aspx?CTT=5&origin=HA102834736
    Regards, 
    Mike Yin
    TechNet Community Support

  • Tabular form with non base table field

    I want to develop a tabular form with
    1. A non-base table edit field to accept a value
    2. Insert/update another table based on the input value
    3. Also, computed field on each row based on other fields on the records (like post-query trigger in oracle forms at block level - for each row)
    Thanks,
    Rachna

    Thanks for your reply.
    Varad, I like the link you sent me. It has a lot of good information.
    I created a process (under page processing) called "Update/Insert Process" that dosn't seem to be working.
    Question, I created a manual tabular form with SQL Query and created a process (under page processing) called "Update/Insert Process", then I check for each record in the tabular form. If the old value <> new value then I update/insert in the new table.
    Any step by step will be highly apprciated - to create process/validation etc.
    Thanks,
    Rachna

  • 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 tabular model - MDX query to filter parameter data based on Tuple value.

    Hello Everyone,
    I am working on SSRS report in which a tabular model is being used as a backend.
    I want to filter the report parameters which are dependent to other parameters. Like, country, state, and cities drop downs.
    All are multi-select parameters. I am using MDX queries to filter the parameters data.
    Based on selected one or more countries, the data of states needs to be filtered.
    The point is the text which is being displayed in state dropdown for each state name is combination of 3 different members.
    So, I created the following Tuple for the same and can see the expected display names in states dropdown.
    "("+
    [Location].[Code 1].CURRENTMEMBER.UNIQUENAME +","+
    [Location].[Code 2].CURRENTMEMBER.UNIQUENAME +","+
    [Location].[Descr].CURRENTMEMBER.UNIQUENAME +")"
    Now, when I would like filter the cities data based on selected one or more states, I am unable to pass the multiple Tuples (more than one selected Tuples) as parameter for cities dropdown.
    The following is my query for City parameter. It is working well when I select only one State from the dropdown.
    However, when I select multiple states, it is unable to convert the Tuple into SET in ELSE part of IIF condition specified in following query.
    Can anybody help me how to resolve the error that I am getting about STRTOSET function?
    Or
    Are there any other alternatives to achieve this requirement?
    Any help would be much appreciated.
    Query:
    WITH MEMBER [Measures].[ParameterCaption] AS [City].[City Business].CURRENTMEMBER.MEMBER_CAPTION
    MEMBER [Measures].[ParameterValue] AS [City].[City Business].CURRENTMEMBER.UNIQUENAME
    MEMBER [Measures].[ParameterLevel] AS [City].[City Business].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS ,
    [City].[City Business].Children ON ROWS
    FROM (
    SELECT ( STRTOSET(@State, CONSTRAINED) ) ON COLUMNS FROM [Model])
    WHERE ( IIF( STRTOSET(@State).Count= 1,
    STRTOTUPLE(@State, CONSTRAINED),
    STRTOSET("{
    ("+
    [Location].[Code 1].CURRENTMEMBER.UNIQUENAME +","+
    [Location].[Code 2].CURRENTMEMBER.UNIQUENAME +","+
    [Location].[Descr].CURRENTMEMBER.UNIQUENAME
    + ")
    }",CONSTRAINED )) ) CELL PROPERTIES VALUE
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hi,
    I used following dynamic query in expression of dataset of parameter and it works like a charm.
    "WITH MEMBER [Measures].[ParameterCaption] AS [City].[City Business].CURRENTMEMBER.MEMBER_CAPTION "&
    "MEMBER [Measures].[ParameterValue] AS [City].[City Business].CURRENTMEMBER.UNIQUENAME "&
    "MEMBER [Measures].[ParameterLevel] AS [City].[City Business].CURRENTMEMBER.LEVEL.ORDINAL "&
    "SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , " &
    "[City].[City Business].Children ON ROWS " &
    " FROM [Model] WHERE ({"& join(Parameters!Location.Value,",") &"}) CELL PROPERTIES VALUE"
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

  • 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

  • Issue with SQL Query with Presentation Variable as Data Source in BI Publisher

    Hello All
    I have an issue with creating BIP report based on OBIEE reports which is done using direct SQL. There is this one report in OBIEE dashboard, which is written using direct SQL. To create the pixel perfect version of this report, I am creating BIP data model using SQL Query as data source. The physical query that is used to create OBIEE report has several presentation variables in its where clause.
    select TILE4,max(APPTS), 'Top Count' from
    SELECT c5 as division,nvl(DECODE (C2,0,0,(c1/c2)*100),0) AS APPTS,NTILE (4) OVER ( ORDER BY nvl(DECODE (C2,0,0,(c1/c2)*100),0))  AS TILE4,
    c4 as dept,c6 as month FROM 
    select sum(case  when T6736.TYPE = 'ATM' then T7608.COUNT end ) as c1,
         sum(case  when T6736.TYPE in ('Call Center', 'LSM') then T7608.CONFIRMED_COUNT end ) as c2,
         T802.NAME_LEVEL_6 as c3,
         T802.NAME_LEVEL_1 as c4,
         T6172.CALENDARMONTHNAMEANDYEAR as c5,
         T6172.CALENDARMONTHNUMBERINYEAR as c6,
         T802.DEPT_CODE as c7
    from
         DW_date_DIM T6736 /* z_dim_date */ ,
         DW_MONTH_DIM T6172 /* z_dim_month */ ,
         DW_GEOS_DIM T802 /* z_dim_dept_geo_hierarchy */ ,
         DW_Count_MONTH_AGG T7608 /* z_fact_Count_month_agg */
    where  ( T802.DEpt_CODE = T7608.DEPT_CODE and T802.NAME_LEVEL_1 =  '@{PV_D}{RSD}' 
    and T802.CALENDARMONTHNAMEANDYEAR = 'July 2013'
    and T6172.MONTH_KEY = T7608.MONTH_KEY and T6736.DATE_KEY = T7608.DATE_KEY
    and (T6172.CALENDARMONTHNUMBERINYEAR between substr('@{Month_Start}',0,6)  and substr('@{Month_END}',8,13))
    and (T6736.TYPE in ('Call Center', 'LSM')) )
    group by T802.DEPT_CODE, T802.NAME_LEVEL_6, T802.NAME_LEVEL_1, T6172.CALENDARMONTHNAMEANDYEAR, T6172.CALENDARMONTHNUMBERINYEAR
    order by c4, c3, c6, c7, c5
    ))where tile4=3 group by tile4
    When I try to view data after creating the data set, I get the following error:
    Failed to load XML
    XML Parsing Error: mismatched tag. Expected: . Location: http://172.20.17.142:9704/xmlpserver/servlet/xdo Line Number 2, Column 580:
    Now when I remove those Presention variables (@{PV1}, @{PV2}) in the query with some hard coded values, it is working fine.
    So I know it is the PV that's causing this error.
    How can I work around it?
    There is no way to create equivalent report without using the direct sql..
    Thanks in advance

    I have found a solution to this problem after some more investigation. PowerQuery does not support to use SQL statement as source for Teradata (possibly same for other sources as well). This is "by design" according to Microsoft. Hence the problem
    is not because different PowerQuery versions as mentioned above. When designing the query in PowerQuery in Excel make sure to use the interface/navigation to create the query/select tables and NOT a SQL statement. The SQL statement as source works fine on
    a client machine but not when scheduling it in Power BI in the cloud. I would like to see that the functionality within PowerQuery and Excel should be the same as in Power BI in the cloud. And at least when there is a difference it would be nice with documentation
    or more descriptive errors.
    //Jonas 

Maybe you are looking for

  • Why did I have to fire BT at my inconvenience beca...

    I logged a complaint in March 2011 and was told BT would respond within 10-14 days. To date(June 2011) I have still had no correspondence. I dug my heals in and refused to pay the amount that the dispute is over. Ater several disruptions to my intern

  • Can we save the warning message in the message log of Lead.

    Hi, I have an requirement where i have to raise an warning message while "creation of lead from campaign" on campaign UI, I can raise that warning message using below code. DATA lr_message_service TYPE REF TO cl_bsp_wd_message_service. lr_message_ser

  • JDeveloper IDE Tool - Thank you Oracle/Sun and Java community

    I am sure it has been done many times over within the JDeveloper community discussion but I felt compelled to stop, think and acknowledge the efforts here. To Oracle, Sun and others that have contributed to this software and resources a huge THANK YO

  • WLS 5.1 sp4 on Redhat 6.2 and Apache 1.3.12

    The file mod_wl.so for linux should be available from sp3 onwards but I installed WLS 5.1 and then sp4 - it does not contain the Apache-Weblogic bridge share library for linux. Any pointers... (I looked in lib/linux/ directory) Should I install each

  • Display Chinese Text in Form 6i

    Hi, I am trying to put Chinese text on forms under Form 6i and allow users to enter double-byte Chinese characters. But Form 6i cannot display the Chinese text that I entered. A double-byte Chinese text is always displayed as '?' in the Form. I have