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

SSAS MDX performance tunning

$
0
0

Dear guys,

How can fine tune the following MDX query. Currently it takes 1mmin25sec to run which is too much...

I am trying to get for each Pos Stratum (kind of point of sale Category) the best sale.. the query works but it's too slow and I am looking how to bypass the crossjoin i currently have...

SELECT 
		GENERATE
		(
			EXCEPT(
					[Point Of Sales].[POS Stratum].[CAT POS STRATUM].MEMBERS,
					{[Point Of Sales].[POS Stratum].[CAT POS STRATUM].&[-],
					 [Point Of Sales].[POS Stratum].[CAT POS STRATUM].&[?],
					 [Point Of Sales].[POS Stratum].[CAT POS STRATUM].&[]
					 }
				)
			,TOPCOUNT({[Point Of Sales].[POS Stratum].CURRENTMEMBER * [Point Of Sales].[POS Name].children},1
					,[Measures].[Sales Amount]
				)
		)
		 ON 1
		,[Measures].[Sales Amount] ON 0
FROM 
	[CUBE LNL DM]
WHERE
	{[Calendar].[Calendar - Monthly].[CAT CALENDAR YEAR].&[2012]}

The bottleneck is the crossjoin between POS Stratum and the Pos names. 

Thanks in advance


Miloud Bel.


Removing duplicates in Dimension

$
0
0

Hi,

I have created one Dimension that is parent-child dimension, it contains duplicates and the hierarchy of the dimension is correct. But my problem is to eliminate that duplicates from that Dimension.

mdx wont resolve null value

$
0
0

when i exec the following mdx,

with member [Measures].[rec_check] as
iif(isempty([Measures].[_Acctdtl Transaction Count]),0,1)
SELECT [Measures].[rec_check] on columns
FROM [Main Transaction Detail] WHERE ([COB Date Attr].[COB Date].&[20130201])

I get the expected result of 1 since the returned count is not null

rec_check

      1

However if I change the where clause to a date not in my cube and run this query

with member [Measures].[rec_check] as
iif(isempty([Measures].[_Acctdtl Transaction Count]),0,1)
SELECT [Measures].[rec_check] on columns
FROM [Main Transaction Detail] WHERE ([COB Date Attr].[COB Date].&[20130202])

then I get "(null)" but my conditional should have made it a 0

rec_check

   (null)

What is wrong ?  Thankyou for your help!

How to restrict the dimensions as per the role in SSAS?

$
0
0

Hi All,

I have done the cube it is working successfully. And roles are decided also devided as For Full access and Read only.

my question is, i am trying to restrict the dimesions as per the required to show the dimensions.

for example.

For Role1: Full Access

It will shows all dimensions

For Role2: Read Access

Out of 10 dimesions only shows 3 dimesion as we requiered.

i am playing with the SSAS role but not getting any required answer please tell any one steps to how to restrict it.

Thank You.

Regards,

Parikshit Deshpande

ssas

$
0
0
while creating a cube we can connect up to how many data sources?

Bottom Count at different hierarchy level

$
0
0

Hi,

I am looking to get bottom count of products against a sales measure with a filter of Class that is not part of the same hierarchy and is one of the attributes in the list. So AdventureWorks Products come under product categories hierarchy and class is not part of the same hierarchy its in the attribute list. How to get bottom 10 products that belongs to class 'C' and 'L' only by creating a sets?

Thanks


Atif Yasin DATA/BI ENGINEER

MDX question on hierarchy, level and current member

$
0
0

I am trying to always use a specific level in a hierarchy inside a calculated measure.

For Example, in my function, this expression works fine:

[Time].[YQP].currentmember

My YQP hierarchy is Year -> Quarter -> Period -> Week -> Day

I would like to always grab the "week" level, especially if a Day is selected in the client.

Is there a more elegant way rather than using a case statement to determine the level and using parent/children functions?



Jamie

perform drillthrough action in cube browser window using SSDT

$
0
0

Hi,

   Can anyone help me how to perform drill through action in cube browser window using SSDT (VS 2010 SP1) ? , I can able to do on previous version by right clicking on the measure value and select drill through action but this is not the case with SSDT, do i missing something or there is new way to browse the drill through actions using SSDT.

Thank,

Abhi.


disable calculated measure for all attributes in a specific dimension

$
0
0

Hi,

SSAS 2008R2, Excel 2010...

I have a dimension "Forhandler" that has something like 20 atributes. I want a calculated measure: "Abonnement" to retur null for all attributes i that dimension.... How do I do that?

No luck with a scope statement in calculations!

Regards

Morten


Error message when browsing 2008 R2 cube from Excel

$
0
0
Internal error: An unexpected error occurred(file mdsubcube.cpp' line 6253, function 'MDsubcube::IsPartiallyCoveringCell').

John Schroeder

get two columns from same hierarchy

$
0
0

Hi,

can i get two columns from the same hierarchy in  MDX,

for example i have company dimension it is parent-child dimension, if i want to see one level in one columns and another in another is that possible in MDX.

Level1               Level2

1                         101

2                          102

3                          103

Thanks,

Munna

4,294,967,296 tuples limitation, new twist?

$
0
0

I have a query that was originally created via a PowerPivot query.  I've simplified it below for readability.  This seems to be something that's been encountered any number of times by others and I've even seen references to there being ways to write the query that would avoid this limitation.  At this point I'm more than willing to entertain other options that would use custom written MDX.

Here's my problem:

Please note in the picture that for the Analysis Type With Time I can remove *any one member* from the set and the query will run.  This is my "twist" as I wouldn't expect taking a set of 6 and changing it to five would change the theoretical limit of the tuples to be under the limit stated.

And a couple common answers that I think I've already invalidated...

  • Each attribute is grouped with it's "sibling" attributes from the same dimension in the query
  • My SQL Server version is: Microsoft® SQL Server® 2008 R2 Service Pack 2
  • I've tried doing an EXISTS on the [Sold To Customer].[Customer Desc] attribute since he's the big guy.
  • Wrapping my tuple expression in a NonEmpty function also fails.

I've also read over the following links, though it's very possible I missed something:

Need Help : How to deal with FactlessFact table in cube to get their other nonnumeric details

$
0
0

I have below 4 tables and their fields . Need to find best approach to present relationship between 2 loans and their appropriate measure value during cube development. 

I don't get any idea how to implement this. I really appricate if someone can guide me .

During Browsing the cube i need to drag and drop the fields from perticular table in order

1. "LoanDenomiated" measure field From LoanPositionFact

2. "calendar Date "  field from DateDim

3. "LoanId" field from LoanDim --- Note : Consider LoandId as SubjectLoanId

4. (Object Loan Sk) -"Related Loan Id" field from LoanRelationship

5. "LoanRelationshipTypeCode" from LoanRelationship

Hope below query help to understand this thing :

SELECT

     lrel.SubjectLoanSK AS LoanSK

     ,dt.DateSKAS AsOfDateSK

     ,loan.LoanIdAS'RelatedLoanID'

     ,lrel.LoanRelationshipTypeCode

     ,lrel.LoanRelationshipTypeName

FROM 

     LOAN.TERLoanRelationship lrel

     JOIN  loan.TERLoanDim loan   

           ON lrel.ObjectLoanSK= loan.LoanSK

     JOIN Conformed.TERDate dt

           ON lrel.AsOfDate= dt.CalendarDate

Tables :

1. LoanRelationship : don't have idea that what should i can called this table as  (dim or fact or factlessfacttable)

  • ASOfDate (PK,DateTime,notnull)
  • SubjectLoanSK (PK,FK,int,notnull)
  • ObjectLoanSK(PK,FK,int,notnull)
  • LoanRelationshipTypeCode (nvarchar (255,null)
  • LoanRelationShipTypeName (nvarchar(255),null)

2.LoanDim

  • LoanSK (PK,int,notnull)
  • LoanId (nchar(10,null)
  • LoanStatusCode Etc......

3.LoanPositionFact

  • AsOfDateSK (PK,FK,int, not null)
  • LoanSK(PK,FK,int,notnull)
  • PortfolioSK (PK,FK,int, Notnull)
  • BusineesUnitSK(PK,FK,int, notnull)
  • LoanUSD (decimal(,) ,null)
  • LoanDemonimated (decimal(,),null)
  • LoanFunctional (decimal(,),null) etc...

4. DateDim

  • DateSK (PK,int,notnull)
  • CalendarDate (datetime,notnull) etc.....

Thanks .


Processing in Tabular Mode shows out of memory after loading cache

$
0
0

Hello all,

actually we are seeing a strange behavior of SQL Server 2012 SP1 Analysis Services in Tabular mode.

We are a running SQL Server on a Windows Server 2012 Maschine.
After modify one measure we see during deployment the following:

1. SQL Server allocates 100% of System memory
2. SQL Server calculates several minutes
3. Then System Memory usage is replaces by Cache usage (System Memory uses gets down tu 2%, 98% is used by Cache)
4. Paging happens for several minutes
5. First Cache, then Memory is released and Operation is cancelled with out of Memory.

Bevor changing the measure this did not happen. I cannot see any reason why a changed measure can cause this.

Does anyone have an idea?

Best,
Mark


Mark Kuschel
Blog Xing

Calculating average sales per transaction where a specific product is involved

$
0
0

Hi!

I have a cube with sales-transactions. The granularity is on Sales-transaction-item-level.

Example
*SalesKey
-TransacationKey (Just a column in the fact, no dimenssion)
-TimeKey
-GeographyKey
-ProductKey
SalesAmount

I want to place a product, X, in the filter of an mdx query and than calculate the average salesamount/transaction (also including the other products of the transactions). Also, what is the average sales per transaction for transaction which contains product X.

Best Regards


Passing dynamic parameters to MDX Query

$
0
0

Hi all,

I'm trying to pull daily data from the cube(that out of my control) using simple query of data keys.

I do have..

1. MDX Query is ready.

Select ...... WHERE ( [Date].[Y-W-D].[Date].&[?]

? = DateKey.

2. Date Key Query is ready.

Select CubeDateKey from Database where date between getdate() -8 and getdate()-1 

Yes, there are 7 date keys to run per day.

What I want is..

1. Run MDX with DateKey from the DateKey Set one by one. 

2. and push data into one of table.

Thank you


SoyLover

ssas 2008 Dimension DataColumn DataType UTF-8

$
0
0

I am creating a dimension on a company attribute table from SQLServer.

The company column in the data base table is datatype NVARCHAR(250) and contains UTF-8 data.

When i try to process the dimension in SSAS I get the error:

Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'dbo_Rpt_Dim_Customer_tbl', Column: 'company', Value: 'GD中国移动通信集团上海有限公司'. The attribute is 'Company'.

If I restrict the database table company column to non-UTF-8 and have duplicate values the dimension processes without error.

How can I get SSAS to recognize the UTF-8 values??

sql question

$
0
0

I have created a database for my work and now at the end of month reports are due.  I have made all the queries and everything is working great. But, my boss now wants a number that I dont know how to write the expression for.  Here is a bit of background.  It is for the EMS medical at a casino.  So this is from a medical report. I have two yes/no boxs. One is for employee and one is for office visit. I need to be able to come up with a monthly total if an employee came in for an office visit. This is what I came up with but of course it doesn't work.  Any help would be greatly appricated. I am using MS Access 2207

IIf(sum(Abs(([run info].[Employee],[run info].[office]="yes", null))) as [Employeeoffice]

How to create a instance dynamically with cross join function ?

$
0
0

HI

with

member [Ganesh]as

'{Crossjoin([Date].[Week].[Week],[Measures].[Teu])}'

select

[Ganesh] oncolumns,non

empty  [FACTCBI-Shipper].[Customer Id Sh].[Customer Id Sh]ONrows

from

[Commodities]

            

        I am getting error for out put ganesh... i need two dimension in the cloumn dynamically to create a calculated member. Please suggent any ideas regarding..

Thanks,

Avula.GK

                      

                 


Thanks, Avula.GK

MSAS database upgrade - Is reprocessing of data required

$
0
0

I have a large SQL 2005 cube , that I upgraded to SQL 2008 R2. The source database also has been upgraded to SQL 2008R2.

Do I need to reprocess all of the data in the cube now, or just changed data in the source.?


P Brent

Viewing all 2472 articles
Browse latest View live


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