Showing posts with label pivot. Show all posts
Showing posts with label pivot. Show all posts

Monday, March 26, 2012

Excel drillthrough to OLAP error

I am using the MSDN workaround Drillthrough VBA code to enable a drillthough from an Excel pivot table to my OLAP cube. It works fine on 2 PCs in my area. However on a 3rd PC,I get the following error:

"The OLAP provider does not support custom grouping. Custom groups were previously defined for this PivotTable Report.
Do you wish to retain the custom group definitions for the future?....."

All 3 PCs are using Excel 2003. All have data access components v2.8 installed.
We are using Analysis Services on SQL Server 2000 Enterprise Edition.

I have been tearing my hair out trying to find out the differences between the PCs....

Any help would be appreciated.

Data access components probably has nothing to do with the situation. One idea is to check service pack version of the Office installed. Make sure it is the same version.
Also try and run Office setup through add/remove programs and repair Office installation.

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

sql

Excel drillthrough to OLAP error

I am using the MSDN workaround Drillthrough VBA code to enable a drillthough from an Excel pivot table to my OLAP cube. It works fine on 2 PCs in my area. However on a 3rd PC,I get the following error:

"The OLAP provider does not support custom grouping. Custom groups were previously defined for this PivotTable Report.
Do you wish to retain the custom group definitions for the future?....."

All 3 PCs are using Excel 2003. All have data access components v2.8 installed.
We are using Analysis Services on SQL Server 2000 Enterprise Edition.

I have been tearing my hair out trying to find out the differences between the PCs....

Any help would be appreciated.

Data access components probably has nothing to do with the situation. One idea is to check service pack version of the Office installed. Make sure it is the same version.
Also try and run Office setup through add/remove programs and repair Office installation.

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Friday, March 23, 2012

excel data pivot/unpivot to sql server 2005 table

The following is a SAMPLE data from an excel spreadsheet. This SAMPLE data has many other fields as date. Here I have only used two date columns i.e. 28 Dec 2006 and 29 Dec 2006
This data needs to be exported into sql server 2005 table which has the fields below where I have placed the data into a table.
How can this be done please?

data:

Ref Sector Name 28 Dec 2006 29 Dec 2006
1 Sovereign RUSSIA 05 null 173.21
2 Sovereign RUSSIA 07 102.99 102.22
3 Sovereign RUSSIA 10 114.33 104.63
4 Sovereign RUSSIA 18 115.50 145.50
...

sql server table

create table tblData
(
DataID int,
Ref int,
Sector varchar(20),
Name varchar(20),
Date datetime,
value decimal(6,2)
)

DataID Ref Sector Name Date value
1 1 Sovereign RUSSIA 05 28 Dec 2006 null
2 1 Sovereign RUSSIA 05 29 Dec 2006 173.21
3 2 Sovereign RUSSIA 07 28 Dec 2006 102.99
4 2 Sovereign RUSSIA 07 29 Dec 2006 102.22
5 3 Sovereign RUSSIA 10 28 Dec 2006 114.33
6 3 Sovereign RUSSIA 10 29 Dec 2006 104.63
7 4 Sovereign RUSSIA 18 28 Dec 2006 115.50
8 4 Sovereign RUSSIA 18 29 Dec 2006 145.50
...

First import the data into temp table..

Then use the UNPIVOT operator to get the required data..

Here the complete query,

Code Snippet

/*

create table tblData

(

DataID int identity(1,1),

Ref int,

Sector varchar(20),

Name varchar(20),

Date datetime,

value decimal(6,2)

)

*/

Code Snippet

Create Table #tempdata (

[Ref] int ,

[Sector] Varchar(100) ,

[Name] Varchar(100) ,

[28-Dec-2006] float ,

[29-Dec-2006] float

);

Insert Into #tempdata Values('1','Sovereign','RUSSIA05',NULL,'173.21');

Insert Into #tempdata Values('2','Sovereign','RUSSIA07','102.99','102.22');

Insert Into #tempdata Values('3','Sovereign','RUSSIA10','114.33','104.63');

Insert Into #tempdata Values('4','Sovereign','RUSSIA18','115.50','145.50');

Go

Code Snippet

Declare @.UnPivotColumns as varchar(max)

Select@.UnPivotColumns = ''

Select @.UnPivotColumns = @.UnPivotColumns + ',[' + name + ']' from tempdb.Sys.columns

Where object_id = object_id('tempdb..#tempdata')

and column_id > 3

Select@.UnPivotColumns = Substring(@.UnPivotColumns, 2, len(@.UnPivotColumns)-1)

Insert Into tblData(ref,sector,name,date,value)

Exec ('Select ref,sector,Name,cast(date as datetime),[value]

from #tempdata unpivot([value] for [date]

in (' + @.UnPivotColumns + ') )as uptv')

Drop table #tempdata;

--To fill the missed values when the value is null

Insert Into tblData

select

fulldata.*,

tbl.value

from

(

select * from

(select distinct ref,sector,namefrom tblData) data

cross join (select distinctDatefrom tblData) dates

) fulldata

left outer join tblData tbl

on tbl.ref = fulldata.ref

and tbl.sector = fulldata.sector

and tbl.name = fulldata.name

and tbl.Date = fulldata.date

where

tbl.Date is null

Select * from tblData

Excel Browser error

Hi

I'm trying to browse a cube using excel. I get through the pivot table wizrd ok but when I click finish I am getting the following error:

XML for Analysis parser: The localeidentifier property is not overwritable and cannot be assigned a new value

I get the message regardless of whether I am trying to connect to my own cubes or the Adventure Works sample. Any idea of cause & remedy please

Thanks

Wayne

A couple of things you may want to try.

This error seems to occur if local language is anything other than English-US

a) Refer to post http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=961463&SiteID=17. This relates to CTP2, but there are a couple of tips that may be of use.

b) Had a similar issue, & narrowed down to a conflict between AS_OLEDB Version 8 & 9 installed on same PC. Seems the upgrade to 9 doesn't clean up the old version. To resolve this, run uninstall of the existing oledb driver, go to C:\Program Files\Common Files\System\Ole DB & delete all files in this directory if they exist, re-install AS_OLEDB 9.0.

P.S. Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider (OLEDB 9.0) available at www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc

c) Check analysis server default language.

i.e. SQL Management studio, connect to Analysis Server, Properties (right click on server), Language/Collation, set to US English.

Excel Browser error

Hi

I'm trying to browse a cube using excel. I get through the pivot table wizrd ok but when I click finish I am getting the following error:

XML for Analysis parser: The localeidentifier property is not overwritable and cannot be assigned a new value

I get the message regardless of whether I am trying to connect to my own cubes or the Adventure Works sample. Any idea of cause & remedy please

Thanks

Wayne

A couple of things you may want to try.

This error seems to occur if local language is anything other than English-US

a) Refer to post http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=961463&SiteID=17. This relates to CTP2, but there are a couple of tips that may be of use.

b) Had a similar issue, & narrowed down to a conflict between AS_OLEDB Version 8 & 9 installed on same PC. Seems the upgrade to 9 doesn't clean up the old version. To resolve this, run uninstall of the existing oledb driver, go to C:\Program Files\Common Files\System\Ole DB & delete all files in this directory if they exist, re-install AS_OLEDB 9.0.

P.S. Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider (OLEDB 9.0) available at www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc

c) Check analysis server default language.

i.e. SQL Management studio, connect to Analysis Server, Properties (right click on server), Language/Collation, set to US English.

Thursday, March 22, 2012

Excel 2007 Services

I have a test environment with Office 2007, including Sharepoint and excel services. I was able to publish pivot table reports to a report library and then include them in dashboards and analyse in my web browser. Now al of a sudden, after publishing an excel report to excel services and when I try to open it in my web browser, I get the following error message: "The file you selected cannot be opened because it is corrupt, protected by Information Rights Management, or in a file format not supported by Excel Services. Excel 2007 may be able to open this file". Indeed the full client is able to open the file.

What strikes me is that editing the excel reports which worked fine in the past and republishing them, causes no problems. However after adding a pivot table, the same problem occurs.

Any idea?

Thanks in advance

Joos

Thank you for your post - Our group is having the same issue - seeing that your post was placed 6 weeks ago - was there a solution or fix that made the function work for your group?

Thank you,

proliant5000@.hotmail.com

|||

Moving to RS forum

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

I did fix it but I do not know how...I guess a reinstall fixed the problem.

But there is another problem. I have to store username and password in the connection. If not, I get an error message in sharepoint.

I would like normal windows authentication to use the roles defined in AS.

sql

Excel 2007 Services

I have a test environment with Office 2007, including Sharepoint and excel services. I was able to publish pivot table reports to a report library and then include them in dashboards and analyse in my web browser. Now al of a sudden, after publishing an excel report to excel services and when I try to open it in my web browser, I get the following error message: "The file you selected cannot be opened because it is corrupt, protected by Information Rights Management, or in a file format not supported by Excel Services. Excel 2007 may be able to open this file". Indeed the full client is able to open the file.

What strikes me is that editing the excel reports which worked fine in the past and republishing them, causes no problems. However after adding a pivot table, the same problem occurs.

Any idea?

Thanks in advance

Joos

Thank you for your post - Our group is having the same issue - seeing that your post was placed 6 weeks ago - was there a solution or fix that made the function work for your group?

Thank you,

proliant5000@.hotmail.com

|||

Moving to RS forum

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

I did fix it but I do not know how...I guess a reinstall fixed the problem.

But there is another problem. I have to store username and password in the connection. If not, I get an error message in sharepoint.

I would like normal windows authentication to use the roles defined in AS.

Excel 2007 Services

I have a test environment with Office 2007, including Sharepoint and excel services. I was able to publish pivot table reports to a report library and then include them in dashboards and analyse in my web browser. Now al of a sudden, after publishing an excel report to excel services and when I try to open it in my web browser, I get the following error message: "The file you selected cannot be opened because it is corrupt, protected by Information Rights Management, or in a file format not supported by Excel Services. Excel 2007 may be able to open this file". Indeed the full client is able to open the file.

What strikes me is that editing the excel reports which worked fine in the past and republishing them, causes no problems. However after adding a pivot table, the same problem occurs.

Any idea?

Thanks in advance

Joos

Thank you for your post - Our group is having the same issue - seeing that your post was placed 6 weeks ago - was there a solution or fix that made the function work for your group?

Thank you,

proliant5000@.hotmail.com

|||

Moving to RS forum

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

I did fix it but I do not know how...I guess a reinstall fixed the problem.

But there is another problem. I have to store username and password in the connection. If not, I get an error message in sharepoint.

I would like normal windows authentication to use the roles defined in AS.

Wednesday, March 21, 2012

Excel 2003 does not refresh data properly ?

Hi all,

I'm currently having an issue with Excel 2003 pivot table accessing an AS2005 cube.

If we do an update on a dimension attribute (product description) for instance the modification does not show in our pivot table when the user hit the refresh button. To show the modified value of the attribute, the user need to drag the dimension out of the pivot table and drag it back in...

Here are the step to reproduce this issue on adventure works:

- Create a pivot table showing internet sales amount for every product (product description) on rows and every calendar year on columns.

- Change the description of one of the product

- Fully process dimensions and cubes

- hit the refresh button in your Excel pivot table

To show the modified description you need to drag the product description out of the pivot table and drag it back in.

Any help would be appreciated

TIA,

Eric

Any property I need to change in my connection string in order to refresh my dimension data when the user hit the refresh button in Excel 2003 Pivot table?|||We are dealing with the same problem. I would love to know if anyone has found a solution that doesn't involve dragging the field out of the table and then back in.

Kyle
|||

Hi Kyle,

I currently have an open case with Microsoft about this issue, I'll let you know as soon as they find a solution. The problem is they can't reproduce this issue on their side but I face this problem in every installation we do.

Currently, we are using a macro when the worksheet opens to move the fields out of the pivot table and the bring them back in.

Regards,

|||Thanks for the information Eric. After doing more research, it looks like the issue for us may be that we are using integer surrogate keys that can change every time the star schema tables are reloaded. So when the Excel PivotTable is initially built, the key for one dimension member may be 100, and when the data is reloaded the same member may end up with a key value of 105. Then, when the PivotTable is refreshed, it confuses the data between the dimension members with keys 100 and 105.

I'll be interested to hear what the solution is for you, and maybe you could say whether or not surrogate keys or changing dimension member keys would be possible in your environment.

Excel 2003 does not refresh data properly ?

Hi all,

I'm currently having an issue with Excel 2003 pivot table accessing an AS2005 cube.

If we do an update on a dimension attribute (product description) for instance the modification does not show in our pivot table when the user hit the refresh button. To show the modified value of the attribute, the user need to drag the dimension out of the pivot table and drag it back in...

Here are the step to reproduce this issue on adventure works:

- Create a pivot table showing internet sales amount for every product (product description) on rows and every calendar year on columns.

- Change the description of one of the product

- Fully process dimensions and cubes

- hit the refresh button in your Excel pivot table

To show the modified description you need to drag the product description out of the pivot table and drag it back in.

Any help would be appreciated

TIA,

Eric

Any property I need to change in my connection string in order to refresh my dimension data when the user hit the refresh button in Excel 2003 Pivot table?|||We are dealing with the same problem. I would love to know if anyone has found a solution that doesn't involve dragging the field out of the table and then back in.

Kyle
|||

Hi Kyle,

I currently have an open case with Microsoft about this issue, I'll let you know as soon as they find a solution. The problem is they can't reproduce this issue on their side but I face this problem in every installation we do.

Currently, we are using a macro when the worksheet opens to move the fields out of the pivot table and the bring them back in.

Regards,

|||Thanks for the information Eric. After doing more research, it looks like the issue for us may be that we are using integer surrogate keys that can change every time the star schema tables are reloaded. So when the Excel PivotTable is initially built, the key for one dimension member may be 100, and when the data is reloaded the same member may end up with a key value of 105. Then, when the PivotTable is refreshed, it confuses the data between the dimension members with keys 100 and 105.

I'll be interested to hear what the solution is for you, and maybe you could say whether or not surrogate keys or changing dimension member keys would be possible in your environment.

Excel 2003 does not refresh data properly ?

Hi all,

I'm currently having an issue with Excel 2003 pivot table accessing an AS2005 cube.

If we do an update on a dimension attribute (product description) for instance the modification does not show in our pivot table when the user hit the refresh button. To show the modified value of the attribute, the user need to drag the dimension out of the pivot table and drag it back in...

Here are the step to reproduce this issue on adventure works:

- Create a pivot table showing internet sales amount for every product (product description) on rows and every calendar year on columns.

- Change the description of one of the product

- Fully process dimensions and cubes

- hit the refresh button in your Excel pivot table

To show the modified description you need to drag the product description out of the pivot table and drag it back in.

Any help would be appreciated

TIA,

Eric

Any property I need to change in my connection string in order to refresh my dimension data when the user hit the refresh button in Excel 2003 Pivot table?|||We are dealing with the same problem. I would love to know if anyone has found a solution that doesn't involve dragging the field out of the table and then back in.

Kyle
|||

Hi Kyle,

I currently have an open case with Microsoft about this issue, I'll let you know as soon as they find a solution. The problem is they can't reproduce this issue on their side but I face this problem in every installation we do.

Currently, we are using a macro when the worksheet opens to move the fields out of the pivot table and the bring them back in.

Regards,

|||Thanks for the information Eric. After doing more research, it looks like the issue for us may be that we are using integer surrogate keys that can change every time the star schema tables are reloaded. So when the Excel PivotTable is initially built, the key for one dimension member may be 100, and when the data is reloaded the same member may end up with a key value of 105. Then, when the PivotTable is refreshed, it confuses the data between the dimension members with keys 100 and 105.

I'll be interested to hear what the solution is for you, and maybe you could say whether or not surrogate keys or changing dimension member keys would be possible in your environment.

Excel 2003 and nonemptycrossjoin

I am trying to utilize an Excel 2003 pivot table as a client tool to front end a project I am developing. I have created the cube in Analysis Services 2005 and it works fine when I run MDX against it directly. The problem that I am having is that Excel is not using nonemptycrossjoin in the pivot table. I have Teo Lachev's book "Applied Microsoft Analysis Services 2005' and I was looking for tips and found a note on p. 633 referring to a workaround (http://blogs.msdn.com/bi_systems/articles/162852.aspx).

To simplify testing, I reduced the query down to the most essential dimensions on rows and a single non-calculated measure on columns. The below query takes 1 second from SQL Server Management Studio.

select
nonemptycrossjoin([Product Family].[Product Families].[Product Brand].&[Family1],
[Shift Calendar].[Shift Fiscal].[Fiscal Year].&[2.006E3].&[2006-3].&[2006-08].&[2006-33],
[Failure Root Cause].[FA Failure Root Causes].[FA Pass Fail Indicator].&[Fail].&[Failure1],
[Comp1 Supplier].[Comp1 Suppliers].[Comp1 Supplier Description],
[Comp2 Supplier].[Comp2 Suppliers].[Comp2 Supplier Description]) on rows
{[Measures].[Sum Failed Qty]} on columns
from
[MyCube]

If I remove the nonempycrossjoin, keeping the () on rows to get the implicit crossjoin, the query runs but takes 114s. Now, if I start creating a similar query in Excel, the first few dimensions are pretty fast, but adding the last dimension on rows takes so long that my machine consumes all of its memory (2 GB) and CPU. I have to kill Excel to get my machine back.

So, Excel 2003 does not provide a facility to alter the Data Source, so after a bit of looking around I found the data source in "C:\Documents and Settings\username\Application Data\Microsoft\Queries". Opening my file test.oqy:

QueryType=OLEDB
Version=1
CommandType=Cube
Connection=Provider=MSOLAP.3;Cache Authentication=False;User ID="";Initial Catalog=Analysis Services Test Project;Data Source=localhost;Impersonation Level=Impersonate;Location=localhost;Mode=ReadWrite;Protection Level=Pkt Privacy;Auto Synch Period=20000;Default Isolation Mode=0;Default MDX Visual Mode=0;MDX Compatibility=0;MDX Unique Name Style=0;Non Empty Threshold=0;SQLQueryMode=Calculated;Safety Options=1;Secured Cell Value=0;SQL Compatibility=0;Compression Level=0;Real Time Olap=False;Packet Size=4096
CommandText=AS Test Cube

According to the workaround above, this query should use the "new" method to eliminate empty rows since: 1) Non Empty Threshold is set lower than the number of tuples returned. and 2) there are no calculated measures in the query. Meeting both these criteria should clear the way for the "new" method to be used. Does anyone have any other ideas that I could employ to make this pivot table any faster? Any other tools that would do this with nonemptycrossjoin? I need slice/dice capabilities which is preventing my from using Reporting Services.

Thanks,

Keehan

Hi Keehan,

A question I would have, though, is whether the "Non Empty Threshold" connection property works in the same way in AS 2005 (or is just included for backward compatibility). Unfortunately, I can't locate this info in BOL; but Appendix B of the "MDX Solutions" 2nd Edition covers connection parameters. Hopefully, someone from [MS] will be able to authoritatively answer this?

In any case, I assume that the number of rows returned in your scenario easily exceeds the default threshold. If so, is there any possibility of restructuring the dimensions to exploit the AS 2005 Auto Exists feature - such as folding some separate dimensions into hierarchies of a single dimension?

http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471748080.html

>>

Appendix B: Connection Parameters That Affect MDX.

>>

|||

Deepak,

I kind of see where you are going with auto-exists but I'm not sure how it would be implemented. So, basically, for auto-exists to kick in, the attributes would have to be in the same dimension. So, how would I have say product and calendar in the same dimension. Is this the kind of work around you are thinking about?

Keehan

|||

I think I may know what you are talking about now. Let me dig into this a little more and I'll let you know how it goes.

Cheers