Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all 2472 articles
Browse latest View live

SSAS backup is failing

$
0
0

we are running the SSAS backup though SQL agent jobs and job gets failed after running for 20 hours ,below are the logs

Message
Executed as user: SSO\SQLService. Microsoft.AnalysisServices.Xmla.XmlaException: Server:  The operation was cancelled because of locking conflicts.   at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForSoapFault(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError)   at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForError(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError)   at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessage(Boolean endReceivalIfException, Boolean readSession, Boolean readNamespaceCompatibility)   at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessageAndReturnResult(String& result, Boolean skipResult)   at Microsoft.AnalysisServices.Xmla.XmlaClient.Execute(String command, String properties, String& result, Boolean skipResult, Boolean propertiesXmlIsComplete)   at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.ExecuteStatement(String stmt, StatementType stmtType, Boolean withResults, String properties, String parameters, Boolean restrictionListElement, String discoverType, String catalog)   at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.SendCommand(String command, Boolean withResults, String properties)   at OlapEvent(SCH_STEP* pStep, SUBSYSTEM* pSubSystem, SUBSYSTEMPARAMS* pSubSystemParams, Boolean fQueryFlag).  The step failed.

code of the job is

<Backup xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
  <Object>
    <DatabaseID>Demantra</DatabaseID>
  </Object>
  <File>I:\Analysis Backup\Demantra.abf</File>
  <ApplyCompression>false</ApplyCompression>
</Backup>

This is getting failed from last one month ,first i though it is throwing error because of space but there are plenty of space available now

Size of the database is 950 gb and free space on drive is around 1300 gb ..it runs ince in a week and gets failed and i can not run it on week days

Thanks in advance ..Please let me know if i missed anything


MDX - Cube Calculated member sliding 12 month comparison with previous month data

$
0
0
Hi,

I want to compare Aggregate of following two different resultsets:


SELECT 
[Measures].[Internet Sales Amount] ON COLUMNS,
NON Empty

{
	LastPeriods(
		12, [Date].[Calendar].[Month].[January 2008]
	)
}
 On Rows
FROM
	[Adventure Works];
GO



SELECT 
[Measures].[Internet Sales Amount] ON COLUMNS,
NON Empty

{
	LastPeriods(
		12, [Date].[Calendar].[Month].[February 2008]
	)
}
 On Rows
FROM
	[Adventure Works];
GO




Now actually i want to add a calculated member in the cube in a way that in Current Month, it compares aggregated sales of previous 12 months with the aggregate of previous 12 month from one month before previous month.

For example

In march 2008
Aggregate(Mar2007 .... Feb2008) , 
Aggregate(Feb2007 .... Jan2008) ,
Aggregate(Mar2007 .... Feb2008) - Aggregate(Feb2007 .... Jan2008) AS Rolling_12Month_Growth.

Note: it is different from Month-Over-Month Growth.

So any clue please?

Thanks.

Think BIG but Positive, may be GLOBAL better UNIVERSAL.

Getting Sum(2011) regardless selected months

$
0
0

I have a Time dimension that was generared by Visual Studio.

The dimension is called DimSalesDate and has the hieararchies Year-Week-Date and Year-Month-Date, furthermore DimSalesDate.Year and DimSalesDate.[Month of Year] exist.

I would like to get the total for a specific year, regardless whether also a selection is made for a specific months or set of months.

In the cube calculated measures exist for various years that is defined as

([DimSalesDate].[Year].[Calendar 2011],[Measures].[Qty - Bottles])

I have not used this measure for some time but I am quite sure that it worked in the past but now it does not. I also tried

SUM(([DimSalesDate].[Year].[Calendar 2011],[Measures].[Qty - Bottles])) but that does not work either.

How do get the total for a specific year, regardless whether other filters from DimSalesDate are applied (such as Month of Year or Date)? Can it also work that filters from other Dimensions such as DimCustomer still have an effect?


Range Defined In Scope Statement + MDX

$
0
0

Hi,

Does the Range defined in the Scope Statement should always exisits?

Foe Ex: Lets say  I want to define a Behavior like..

when the user Browses on Product Color "Red"..show him all the Products with Category "Reddish"

Scope{When Product Color Is Red};

This = Show {Product Category Is Reddish}

End Scope

Does this mean I need to always have atleast one Product with Product Color "Red" to define above Scope. What happens if I dont have any Products with "Red" Color  as of today; will my Cube fail processing?

Please confrim.

Regards

Shiv

How do I filter on a segment of text within a dimension attribute

$
0
0

Hi,

How do I filter on a segment of text within a dimension attribute and return at least one other attribute within the same row set. The following ran for 10 minutes before I cancelled; -

SELECT NON EMPTY { [Measures].[myCount] } ON COLUMNS, 
NON EMPTY { FILTER
([Dim1].[myKey].[myKey].ALLMEMBERS * 
[Dim2].[myName].[myName].ALLMEMBERS,
INSTR ([Dim2].[myName].currentmember.member_caption,'myText')>0)
 } ON ROWS 
FROM [myCube]
WHERE [Dim3].[myKey].&[10134]

thanks in advance,

Kieran.


If you have found any of my posts helpful then please vote them as helpful. Kieran Patrick Wood MCTS BI,MCC, PGD SoftDev (Open), MBCS http://www.innovativebusinessintelligence.com/ http://uk.linkedin.com/in/kieranpatrickwood

Filter by referenced dimension

$
0
0

I have a problem I am trying to solve that may be difficult to explain.

I have the below SSAS schema:

The item dimension is referenced directly by the performance fact, and the category dimenion is a Referenced dimension.  The Item Dimension only stores the final leaf category (i.e. the category that is right at the end of the tree, the category structure is n-levels deep).

What I would like to do is return the parent category (left-most category in the tree).

I use this query

SELECT 
{ 
  [Measures].[Revenue]
} ON COLUMNS
,
--NON EMPTY
{
  GENERATE
  (
    {
      [Category].[ParentCategoryId].[All]
    },
    DESCENDANTS
    (
      [Category].[ParentCategoryId].CURRENTMEMBER,
      [Category].[ParentCategoryId].[Level 02]
    )
  )
}
ON ROWS 
FROM ( SELECT ( { [Item].[Company].&[199] } ) ON COLUMNS 
FROM [MdxCube]
)

This will return all root categories, and not just those used by Company 199.  If I add the non-empty, it will return only those used by Company 199, but unfortunately only those which have revenue data.

What I need to do is return all root categories (or any level I want), that have a child category in the FinalLeafCategoryId in the Item table. I have tried filtering with descendents but am having no luck and am very stuck.

Is anybody able to help me with this?  I can supply more information if the above isn't clear enough.

dimension with recursive parent child relationship

$
0
0

It's been a while since I worked with SSAS so I need a refresher. I would appreciate any feed back on my understanding/questions as I've layed out below Thank you.

Say I have a geography dimension that can go several levels deep and data can be booked at various levels in the hierarchy. (Not just at the leaf level)

So, if my hierarhcy looks like

World
    NorthAm
        USA
            NY
            NJ
            CT
    SouthAm
        Brazil
        Argentina
    

Q1: This would mean that I would need a dimension key for every member at every level in the hierarchy so that I can use these keys in the fact table. Like

dimKey       member

1                World
2                NorthAm
3                USA
4                NY
5                NJ
6                CT
7                SouthAm
8                Brazil
9                Argentina

Q2: The dim table above alone doesn't describe the hierarchy so I would need another table like the following. I hope I have the key relationships consistent with the above hierarchy, but hopefully you'll see what I'm doing.

childKey    parentKey
1                1
2                1                
3                2
4                3
5                3
6                3
7                1
8                7
9                7

Q3: The recursive table like the above is the best way to model this kind of uneven hierarchy, as opposed to trying to have separate columns for each level. And in fact, the recursive table is the only way to go in this case because the data can be booked at various depths in the hierarchy.

Q4: Should I try to combine these two tables into one table? Or is that done in the SSAS designer... I think that was called a named view or something like that.

Q5: Within SSAS, there is a setting that controls the aggregation behavior at the upper levels... I think the choices are something like, (a) overwrite upper level values with the aggregate of the lower level values, (b) include the value booked at the upper level with the values at the lower level when showing the aggregate. Not sure if there was another option.

Format measure in 000's

$
0
0
I've been trying to figure out a way of displaying a measure I have - sum of households - in 000's i.e. instead of 4,012,000 I want to display 4,012.00 . I know I can do it as a calculation but is there any way to just format the measure itself and instead of measure being a simply sum(x) or distinct count(x) it's sum(x)/1000 or COUNT(Distinct x)/1000?

Is there a way to migrate PowerPivot Reports from a PowerPivot Workbook to a Workbook with a connection to SQL Server Analysis Services?

$
0
0

I've developed ten PowerPivot reports...I then imported the PowerPivot Workbook into an Analysis Services Project.  Is there any way to reuse the ten PowerPivot reports in a new Workbook connected to Analysis Services or do I have to reimplement each PowerPivot Report?

Thanks,

xRM2011 User

Need help on getting action metadata information on existing cubes using AMO

$
0
0

Hi,

     I am looking for AMO code to get action (drillthrough action) column list on a existing cube without using any MDSCHEMA's. 

    Any help will be greatly appreciated!!

Thanks,

Abhi.

 

Using Excel's Group Function on Distinct Count from SSAS/Pivot Table Yields Incorrect Results

$
0
0

I have a very large cube that holds data based on a date.  The cube contains 2.1 billion rows of data, we are on SQL Server 2008.  Our marketing group accesses the SSAS cube using Pivot Tables in Excel 2007.  One of the measures is a distinct count based on an ID field on each of the 2.1 billion rows of data. 

In excel, the pivot table is filtered by two different dimension attributes -- (1) a date, (2) a description code.  The data filter is May 1, 2012 through July 18, 2012.  The distinct count measure at this point is 396,725.  They then used the group function in Excel to group the dates into 2 segments.  When the group function is applied to the dates as follows:  May 1, 2012 through June 5, 2012, the distinct count for this group goes to 713,318 while the distinct count of the other date group (June 6 thru July 18) is 626,459 with a grand total distinct count of 1,111,656.  None of the distinct counts when the data is grouped by the dates makes sense.  The distinct count cannot be larger than the distinct count of the total without the grouping.  Nothing about these pivot tables is different except for the grouping. 

Interestingly enough, if I change the original date filter to May 1, through July 30, and group the data, the distinct count problem doesn't occur.  Has anyone seen any issues like this or know of either a fix or the cause?

DB Connection fails in certain contexts

$
0
0

I'm running through the tutorial and all has been working fine connecting to AdventureWorksDW until I got to Lesson 4 - Automatically Grouping Attribute Members. Here it insturcs you to right-click the Customer table, then click Explore Data. I get
"Login timeout expired. An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default setting SQL Server down not allow remote connections. Name Pipes Provider: Could not open a connection to SQL Server [2]."

I verified that remote connections are allowed. I can deploy successfully and connect and browse the database via Server Explorer.  I have tried different user logins as well, including specific accounts and service account.

Thanks,

Steve

SSAS TABULAR DAX - Calculated column with SAMETIMEPRIORYEAR shows blank values , when referncing a coulmn in same table.

$
0
0

Hi All,

Appreciate any help with the following question.

************************************************************

 I am trying to create a calculated column in a table, as in below example.
    {Ref: AdventureWorks Cube | Table: 'Internet Sales'}

    =CALCULATE(SUM('Internet Sales'[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

                   I get blank values.
************************************************************

I have tried with different date related functions (ex. LASTDATE() etc) and same result.

 Following works fine.
  1) Create a measure with same formula.
    SalesAmountPY := CALCULATE(SUM('Internet Sales'[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
   
  2)  I can create a column in table 'Internet Sales', something like below and works fine.
      (Function SUM referencing to a column in different table)
        =CALCULATE(SUM('Foreign Exchange'[Conversion_Rate]),LASTDATE(DATEADD("Date'[Date],-1,YEAR)) )

Thanks,
Nagaraj




CubeRankedMember MDX in Excel

$
0
0

Hi -- The following code works great in excel:

CUBESET(“PowerPivot Data”,”TopCount(([Combined_Data].[Month].[January],[Combined_Data].[Company Name].children),10,[Measures].[Sum of Prod Rev c])”,”TOP 10 companies”)

However, in excel if I have to replace children in the above statement and give reference to the CELL which has multiple Children ("(Multiple Items)") selected, how can I do that?

Thanks

Krish

[SSAS 2008 R2] Transport Layer error

$
0
0

Hi,

I have a multi-tier application having app, DB and SSRS/SSAS hosted on seperate servers. The SSAS server hosts various databases with various cubes deployed. All DBs in SSAS have a Role to which 'Everyone' is added to Membership and has Read access to Cubes and Dimensions.

The issue that I found is that when I browse the cubes through application from the App Server, then all cubes could be browsed fine. No errors. I did a trace to find the NTUserName in Audit Login. When I browse the cube from App Server, correct Windows credential is shown under NTUserName. But when I do it from client machine, it shows ANONYMOUS LOGON.

Why is it happening?

Regards,

{P}


Microsoft Techie




my first MDX query: number of customers per week that placed at least one order

$
0
0

Hi All,

I'm still reading "Professional Microsoft SQL Server Analysis Services 2008 with MDX" and working through the examples, but I can't finish soon enough.  I have a need for an MDX query but I myself am not capable of writing it.  I'm looking for the number of customers per country that had at least one order during a particular work week.  The report in question will show a variable number of work week columns, but it will default to the most recent 9 work weeks.  (Was that last part even relevant?)

Dimensions:[OrderDate].[Work Week Calendar].[Work Week] (My report should only show the work week, not individual dates); [Customers].[Customer Name], [Customers].[Country] (There are about 8 separate countries, but I only use 2 in the example T-SQL code below)

Measure: [Order Amount] (Any value > 0 suggests an order was placed)

The final SSRS report will be a line chart with a line for each of the different countries.  The bottom legend will be work weeks and the values of each line for each work week will be the number of customers in that country that placed at least one order during that particular work week.

Since I'm not sure how exactly to phrase the question any better than "how many customers had at least one order each week during the previous 9 weeks," you can see what I'm after in the following T-SQL: the "Totals" column.

Could somebody please assist?  Thanks.

-Eric

-------------------------------------------------------------------------------------------------

DECLARE @example TABLE   (
      Customers varchar(10)
    , [WW1-US] int
    , [WW1-UK] int
    , [WW2-US] int
    , [WW2-UK] int
    , [WW3-US] int
    , [WW3-UK] int
)

INSERT INTO @example VALUES
  ('Cust X',    5, NULL,    3, NULL,    9, NULL)
, ('Cust Y', NULL,   13, NULL, NULL, NULL,    4)
, ('Cust Z',    6, NULL,   13, NULL,   16, NULL)
, ('Totals',    2,    1,    2,    0,    2,    1)

SELECT * FROM @example WHERE Customers = 'Totals'

Ignoring Data to Analysis Server on Date

$
0
0

Hello Friends

I am new vibe in SSAS

I have been given tables which contain data of years which of new use for new operations in company and for some reasons they dont want to delte that data.

Now problem is , i have incorporated tables in SSAS ,everytime unnecessary aggregates are being calculated which just wastes memmory , processing time and problems to endusers.I just want to ignore date dating before 2012,how can i do that

Kindly help


Asrar

No pivotTable, pivotchart tab when 'explore data' in BIDS 2010

$
0
0

Try MovieClick sample, but not pivottable, pivotchart view when 'explore data' in BIDS 2010 ( with SSAS 2010), only have plain 'table' view

I was able to see it in BIDS 2005 ( with SSAS 2005)


JZ

MDX output in cellset

$
0
0

Hi 

I have executed following query on SSMS and I got only Quarters but when I executed the same using AdomdClient objects. I got parent levels too..how to get the same column names which SSMS display instead of [Date].[Calendar].[.......

SELECT NON EMPTY [Measures].[Internet Sales Amount] ON 0,
NON EMPTY [Date].[Calendar].[Calendar Quarter] ON 1
FROM [Adventure Works]

Setting up access to SSAS 2008 R2 running on Local System account under double-hop scenario

$
0
0

Hi,

I am getting this error while trying to access OLAP cubes under double-hop scenario using a domain account.

The query could not be processed:

  • An error was encountered in the transport layer.
  • The peer prematurely closed the connection.

The scenario is a user is trying to browse OLAP cubes using a web application on server A (first hop) and server A redirects to server B (second hop) where SSAS is running under Local System account.

I tested it with two methods:

1. In connection string passed to SSAS, I used a local user account (created on server B). This works fine and the user could browse OLAP cubes w/o any errors

2. In connection string passed to SSAS, I used a domain account (created within the same domain where servers are). This gives the transport layer error as mentioned above. This is happening because the user details are lost during second hop and SSAS receives the request as ANONYMOUS LOGON.

As the 1st method is working, can I assume that:
- SSAS is setup to use Kerberos authentication
- SPNs are setup properly on both servers
- Trust this computer for delegation is enabled for both servers
- Trust this user for delegation is enable for the user trying to browse OLAP cubes

Now I need to know:
- Why the domain account is not working for me?
- What settings do I need to change for that domain account in Active Directory so that it could work in the above scenario?

Regards,

{P}


Microsoft Techie

Viewing all 2472 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>