Analysis :: Exclude Members From A Scope - MDX SSAS?

Sep 27, 2013

I'm trying to do a currency conversion with an MDX statement in my Cube SSAS 2012.

Here is my script :

       SCOPE( LEAVES([Entity]) );
SCOPE( LEAVES([Time]) );
SCOPE( LEAVES([Currency]));
SCOPE( [Account].[Account].[Total ACCOUNT].members)
THIS = ([Measures].[Value],[Currency].[Currency].[Local])*([Measures].[Value],[Account].[Account].[Fx Rate]);
END SCOPE;
END SCOPE;
END SCOPE;
END SCOPE;

The problem is I want to exclude frome the scope Currency my local Currency in order to make the conversion only if a currency (€,$, £) is selected. I tried the following syntax but it always return a "MDX script is not valid" :

SCOPE( LEAVES([Currency], Except (LEAVES([Currency],[Currency].[Currency].[Local]);SCOPE( [Measures].[Value] , Except ([Currency].[Currency].members,[Currency].[Currency].[Local]);SCOPE( [Measures].[Value] , Except (LEAVES([Currency],[Currency].[Currency].[Local]);SCOPE( LEAVES([Currency] - [Currency].[Currency].[Local]);

View 5 Replies


ADVERTISEMENT

Analysis :: SSAS Calculated Members For Each Week Of Month

Jul 6, 2015

I have a date dimension with structure/hierarchy (year - month - wkofmonth - day) & measure count

This works fine when I insert wkofmonth in columns & count in values but when I add another measure it duplicates per week

Product CountWk1(jan) CountWk2(jan) CountWk3(jan) CountWk4(jan) SalesVolume
1            1                        2                  0                         0               1000

Is there something I can do on the structure & do 4 calculated members pending how many weeks in a month, is there a simpler way where the next measure does not calculate by columns field.

If calculated member for each week, how do I do this, any example code?

View 2 Replies View Related

Analysis :: Setup Multiple Default Members For A Dimension Attribute In SSAS?

Jun 2, 2015

I have a dimension report with an attribute reporttype which have different member let say A,B,C,D....etc.

I want to set more than one default members for dimension report.

I've read all about how dimensions can have only one default member, but I need to set more than 1.

View 2 Replies View Related

Analysis :: Calculate Members At Certain Level In One Hierarchy As Sum Of Corresponding Members At A Certain Level

Jun 4, 2015

Problem setting is a geography dimension with multiple user defined hierarchies in SSAS 2008. 

Ex.: 
Hierarchy 1 (political territory): level 6 --> level 5 --> level 4 --> level 3 (state) --> level 2 --> level 1
Hierarchy 2 (sales territory): level 4 --> level 3 --> level 2 (sales region) --> level 1
...
Hierarchy 9

The relationship between state and sales region is n:1, i.e. one state belongs to exactly one sales region, and one sales region can consists of one or multiple states.  Unfortunatly I can't define this attribute relationsship in the dimension because it would lead to a diamond-shaped relationsship without a user-defined-hierarchy to back it up. So far that isn't much of a problem, user don't drill down from sales region to state. But now I want to define a calculated member that multiplies a measure from the main measure group with another measure from a weighting factor measure group at the state level and above. The granularity attribute of the geography dimension in the dimension usage tab of the weighting factor measuregroup is the state. 

So far what I've got is:

CREATE MEMBER Currentcube.Measures.[weighted measure state and above] AS NULL;
SCOPE (Measures.[weighted measure state and above],
Descendants(geography.[political territory].[all member],3,SELF_AND_BEFORE),
Descendants(geography.[salesterritory].[all member],2,SELF_AND_BEFORE),
... Descendants(geography.[hierarchy 9].[all member],1,SELF_AND_BEFORE)); this = sum(existing(geography.[political territory].state.members), measures.[main measure group measure] * measures.[weighting measure group measure]);END SCOPE;

This works from a functional point of view, but is rather slow when querying any other hierarchy than the political territory hierarchy, because SSAS first goes down from the state level to the key attribute of the geography dimension, and then aggregates from there to the sales region.In other words, I want SSAS to resolve the relationsship (which state belongs to which sales region) through the dimension, and not through the fact, and apply the calculation afterwards. Like some kind of currency conversion, but only from a certain level upwards.

View 5 Replies View Related

Analysis :: How To Insert New Members In Quantity

Jul 10, 2015

Enterprise 2014 SQL Server - SSAS

I have a need to  insert 50 - 100 new members each week. 

Is there an SSIS procedure that will do this? 

View 3 Replies View Related

Analysis :: Querying Dimension Members In MDX?

Sep 17, 2015

The Member_Key we can get by the method suggested in the post, but when we get the Member_Key, Id as Measures/members then performance is very slow.

Is there any way i can get the Member_key in a set in rows section.

Like

With SET [UniqueName] AS [Geography].[Country].CURRENTMEMBER.UNIQUENAME
Select Measures.Value on Columns,
UniqueName on Rows
From Cube

I want the value as just like

Value
Employees, UniqueName

View 2 Replies View Related

Analysis :: Find Date Ranges On Members And SUM

Jul 24, 2015

I've got two measure groups with a dimension (Dimension A) that is related to one measure group but not the other. I want to find the date ranges of the members of an attribute in Dimension A in Measure Group 1 and apply that to Measure Group 2 in a calculation. This way I can find the sum of a measure from Measure Group A that falls within the time periods of the attributes in Measure Group B. Part of my MDX for this new calculated member starts like this, but doesn't work.

WITH MEMBER [Measures].[New Measure] AS 
IIF( ISEMPTY ([Measures].[Measure 1]), NULL,
SUM(([Date].[Hour].[Hour], [Dimension A].[Attribute].[Attribute]), [Measures].[Measure 2]))

View 3 Replies View Related

Analysis :: Sorting Dimension Members From Fact

Dec 2, 2015

I've got a dimension built from a fact (whatever that's called?) ... it's a date interval field, i.e. 0-5 weeks, 6-10 weeks 11+ weeks. How do I sort these members in the respective order? Looks like this currently:

The problem lies in the fact that I don't have any secondary attributes to order it by, i.e. it's not a physical dimension where I can use a key for the 3 members. I was hoping I wouldn't need to create a separate dimension to get round this.

View 5 Replies View Related

Analysis :: Scope Statement For A Specific Role

Nov 2, 2015

Just wanted to know is there any way to write scope statements only for a specific role in the cube.

View 3 Replies View Related

Analysis :: IIF Does Not Aggregate AND Filter In SCOPE Does Not Work

Oct 22, 2015

We have two measures

[Measures].[NSPO]
is in FACT1  Measure Group
[Measures].[NetSignedPremium] is in FACT2  Measure Group

The requirement is Measure.[NetPremium] should be the greater of

[Measures].[NSPO] OR [Measures].[NetSignedPremium].
 
All three measures are created in the cube and this logic is to be applied in the Calculations section of the cube.

Using an IIF statement like one mentioned below does the job, but data does not aggregate correctly for the

Measure.[NetPremium]
Measure.[NetPremium] = IIF ([Measures].[NetSignedPremium] > [Measures].[NSPO], [Measures].[NetSignedPremium] , [Measures].[NSPO])

To ensure that the columns are aggregated I have to use a SCOPE statement at the leaf level

[01 UWR Reference].[UWR Reference].Members  
 
SCOPE(
    FILTER( NONEMPTY( [01 UWR Reference].[UWR Reference].Members   ) ,
          ( ( ([Measures].[Net Signed Premium Rcvd])
          - ( [Measures].[NSPOTest]  )  )
             < 0 )  )) ;
        This =   [Measures].[Net Signed Premium Rcvd]  ;       
END SCOPE;  

My problem is the FILTER within the SCOPE statement does not work. How to modify the filter in SCOPE? OR How to make IIF Aggregate correctly?

View 4 Replies View Related

Analysis :: Limit Date Dimension Members Dynamically?

Jul 7, 2015

We have a date dimension which spans till 2099 and there are future projection numbers (under measures). I want to limit the data for Future projections only to 5 years from today by default. Is there a way to do this with in the cube. I understand that this can be done using MDX but since we use excel to view the data from the cube it needs to be controlled with in the cube.

View 4 Replies View Related

Analysis :: Statistical Function Results In Calculated Members

Jul 8, 2015

I'm working with the statistical functions Stdev and Median with calculated members.  The only way I can get the "correct" answer is if I have a dimension at the same granularity as the Fact table (Actually it's a degenerate dimension of the FACT table itself).  Otherwise it seems that the measure I'm using with Stdev returns results that are so wildly high, I think it must be acting on the SUM of the measure; because the measure itself is a Summed one. When I try to use the coordinates in the Stdev function, it seems like it is using the wrong set of data points :

stdev( ( [Date].[Date].[Date].members, [Parameter].[Parameter].[Parameter].members ), [Measures].[Value])  returns answers in the thousands when it should be more like 2.5

When used with a query, there would only be a single date member and a specific parameter member.  The total number of fact records is between 200 and 500 with values that range between 0 and 150.  This is the version that gives me answers that resemble the total sum of the [Measures].[Value].

If I add the dimension that is essentially a row number from the fact table, it gives the right answer (slowly, but that will be a different post ....

stdev( ( [Date].[Date].[Date].members, [Parameter].[Parameter].[Parameter].members, [FACTTable].[FACTTable].[KeyField].members ), [Measures].[Value])

View 4 Replies View Related

Analysis :: YTD Calculation For Multiple Hierarchies With SCOPE Statement

Jul 2, 2015

I am stuck in a situation where I want to use YTD for three different calendars of our company and don't want to create three different YTD calculations. However I want to make this work for any measure not for a particular measure

If I create one YTD and try to use in context of three calendars in SCOPE statements then it does not give my right results. Following is my syntax but It does not work.

SCOPE([Billing Date].[SalesCalendar].MEMBERS);
( [Aggregate].[AGGREGATE CODE].[YTD] )   
          = Aggregate({[Aggregate].[AGGREGATE CODE].DefaultMember}*{PERIODSTODATE([Billing Date].[SalesCalendar].[Sales Calendar Year],[Billing Date].[SalesCalendar].CURRENTMEMBER) } );

[Code] ....

However if I comment on one of SCOPE statement , other one works but both don't work simultaneously in context of different calendars.

View 2 Replies View Related

Analysis :: DAX - How To Simulate MDX SCOPE Forcing YEAR Level

Jul 19, 2015

In my fact table (month granularity), I've got a calculation defined: 

Margin%=DIVIDE(SUM(Margin);SUM(SalesAmount))

How should I define a calculation based on "Margin%", so that if I browse the Pivot Table by months it would always show the year level result instead? My date dimension is also with Month granularity and it has a Year column in it. 

View 2 Replies View Related

Caching (storing) Calculated Members In Analysis Services 2005

Mar 2, 2006

Do anybody know if Analysis Services 2005 allows cashing (storing) calculated members ?

There is a cube in Analysis Services 2000 with a calculated member based on some running sums. The performance of MDXs is too slow because running summs are being recalculated for each member of time dimension on each call.

I think that caching calculated members might help me and hope that this feature exists in Analysis Services 2005 .

Thanks!

View 1 Replies View Related

Analysis :: How To Give Permission To Read Dimensions Members In Hierarchy

Jun 9, 2015

I am using a "Client" dimension that includes a "Holding - Client" hierarchy. I have to make sure, that only the appropriate roles may access appropriate members from this dimension, but I only have the information which role may access which ClientID - I do not have the information which HoldingID should be accessible. Also, "Client" is used as the key column of the dimension with "ClientID" and "HoldingID" as key columns. The hierarchy is strict, no client may belong to multiple holdings.

I cannot seem to find the right MDX for the allowed member set. My MDX expression would need to look like this:

[Client].[Holding - Client].[Client].&[*]&[123]

In this example I want to give access for client &123, no matter the holding, so &1&123 and &2&123 would be allowed.

Is this doable?

View 4 Replies View Related

Analysis :: Attribute Relationships Impacts On Members Full Unique Name

Aug 17, 2015

Our SSAS integration didn't initially use attribute relationships.Now that our system has been running for a few years and we have bigger databases, we think we need to add them to improve performance. So we're in the process of adding them but we found out that, when attribute relationships are added, the full unique name of our members all go from something like:

[DIM].[HIERARCHY].[LEVEL].&[GRANDPARENT].&[PARENT].&[MEMBER]
to something like:
[DIM].[HIERARCHY].[LEVEL].&[MEMBER]

It looks nice and SSAS will accept the longer names fine but it will return the short ones in response to 'discovery' requests and in the XMLA response of MDX queries. This is causing problems in our low level XMLA-based modules that assume the long names in and out. is there any clean way to use attribute relationships and still have SSAS generate the long member names. We fiddled with the various documented dim/attribute properties but to no avail. It also appears that some switches are obsolete.

View 6 Replies View Related

Analysis :: Include And Exclude Children In A Single Hierarchy In Parent Child Dimension In MDX

Apr 8, 2015

Include children and exclude children in a single  hierarchy in parent child dimension in mdx

*12-parent
 **20-parent
 - 9-parent
       --250-child1
       --210-child2
        --240-child3
aggregation of 12-parent only
aggregation of 20-parent only
aggregation of  9 with children

View 3 Replies View Related

Analysis :: Using Calculations In SSAS Cube?

May 21, 2015

how can use this mdx script in the calculation part of a cube, will i simply dump it in the script form by starting with the 'create member current cube.

[measures].[test]'
select 
[measures].[abc] on 0,
[xyz].[xyz].(&0):[xyz].[xyz].(&60) on 1
from
(
select
(tail([month].[month].[month].members,6))on 0
from
[cube])

View 3 Replies View Related

Analysis :: Excel Not Connecting To SSAS

Sep 21, 2015

I have created SSAS package successfully.

When I try to connect from excel , to SSAS Getting error message like

A Connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond.

If I connect to SSIS , I'm able to connect correctly.

Why I'm getting this error and how to overcome this?

View 4 Replies View Related

Analysis :: Ssas And Ssrs On Same Server?

Sep 2, 2015

I've see twice this year two different companies either already or planning on having ssas and ssrs running on the same server. 

View 7 Replies View Related

Analysis :: Threshold File For SSAS - PAL

Aug 7, 2015

I am doing workload analysis on SSAS - Tabular (2012), I have perfmon logs captured and want to run through PAL. I am looking out for threshold file for SSAS tabular 2012/2014. 

View 2 Replies View Related

Analysis :: SSAS Calculated Member - MDX

Jul 1, 2015

I have a Calculated Member in SSAS that I need to adjust based what the current member is. 

The code is below

CASE WHEN [Measures].[End LIS] = 0 AND "HELP" THEN
CASE WHEN [Measures].[Beginning LIS] = 0 OR [Measures].[Beginning LIS] + [Measures].[Beginning LIS] + [Measures].[NETACTIVATIONS] = 0 THEN NULL ELSE
 ROUND([Measures].[Disconnects]/(([Measures].[Beginning LIS] + [Measures].[Beginning LIS] + [Measures].[NETACTIVATIONS])/2) * 100 ,2) END
ELSE ROUND(([Measures].[Disconnects] / [AVERAGELIS] * 100) ,2)
END

In English - i need this to translate to - of End LIS is 0 "AND the current member is the current month and current year" THEN carry on 

Else ROUND(([Measures].[Disconnects] / [AVERAGELIS] * 100) ,2).

I came up with 

CASE WHEN [Measures].[End LIS] = 0 
AND [Dim Date].[FSCL_YM].[Month Nm].currentmember.membervalue = Format(now(), "yyyy")+"]&["+Format(now(), "M")
THEN
CASE WHEN [Measures].[Beginning LIS] = 0 OR [Measures].[Beginning LIS] + [Measures].[Beginning LIS] + [Measures].[NETACTIVATIONS] = 0 THEN NULL ELSE
 ROUND([Measures].[Disconnects]/(([Measures].[Beginning LIS] + [Measures].[Beginning LIS] + [Measures].[NETACTIVATIONS])/2) * 100 ,2) END
ELSE ROUND(([Measures].[Disconnects] / [AVERAGELIS] * 100) ,2)
END

But to no avail. 

View 4 Replies View Related

Analysis :: Any Way To See Content Of SSAS Cache?

May 7, 2015

I have cubes which are large and query response time exceeds 1 minute. 

So, I like advice of pre-warming cache. Any way to see if cache is already/still available for the cube?

non related - if there is some setting timeout for SSAS cache?

View 3 Replies View Related

Analysis :: Combine Two SSAS Databases

Jul 6, 2015

I have two ssas databases with same number of cube in them. Cube names are also same. I want to merge/combine these two as one so that my reporting application may see a single database having measures/dimensions from both databases.Is it possible?I am doing this to achieve loose coupling between base and regional development work. if above is not possible, any way to achieve minimum dependency between a base and a regional project.

View 3 Replies View Related

Analysis :: Multiple IIF Statements In SSAS?

Jun 2, 2015

I am using multiple IIF statements in ssas, it does not produce any output, does not shows any error, simply it processing..

View 3 Replies View Related

Analysis :: SSAS Partition Processing

Oct 21, 2015

I am facing issue with partition processing. I am having a SSAS cube which is having 5 partitions. These partitions are processed through a sql server job using SSIS packages. In packages I used SSAS process task to do this.Now problem is, job is running successfully and showing that the step which is having partition process also fine.But data is not updating in the partition. While checking the partition properties, it is not updated with recent date and time.

When I try to manually process the partition, it is getting succeeded and recent data is getting reflected with recent date and time.Package configuration is done in job itself.

View 4 Replies View Related

Analysis :: Where Are Ssas Errors Logged

Apr 30, 2015

I got this error from a sql agent driven cube process yesterday and am wondering where the log of errors is created...

Executed as user: xservername$. <return xmlns="urn:schemas-microsoft-com:xml-analysis"><results xmlns="<root">http://schemas.microsoft.com/analysisservices/2003/xmla-multipleresults"><root
xmlns="urn:schemas-microsoft-com:xml-analysis:empty"><Messages xmlns="urn:schemas-microsoft-com:xml-analysis:exception"><Warning WarningCode="1092354050" Description="Server: Operation completed with 1042 problems
logged." Source="Microsoft SQL Server 2008 R2 Analysis Services" HelpFile="" /></Messages></root></results></return>. 

The step failed.if its a property I can see related to the server in ssms, which property as I see lots of stuff with the word log in the property name.

View 11 Replies View Related

Analysis :: More Than One Cube In One SSAS Database

Dec 13, 2010

Is it possible to have more than one cube under one SSAS database? For example I have a database "Test" and in this the cube exist is "TestCube", is iit possible to deploy another cube "TestCube2" under the Test databse?

If yes then what is the process to do that, the reason I am asing is there are some common dimensions used n both the cubes and I am not sure what is the best way so that I can use the shared dimension?

View 6 Replies View Related

Analysis :: Calculated Attribute In SSAS?

Sep 17, 2015

I've been working with SSAS for a good few years now but I keep bumping into this problem - my users are trying to build a measure that is based on a calculated attribute and finding it difficult to work out how to write the MDX to do so. Intuitively, they thought a Calculated Member would work, but I don't think a Calculated Member is quite the same thing from my understanding.

So, here's the scenario.

We have a Product Dimension. We have a Measure that is the Number of days the Product took to make, e.g. 5 days. We also have a Product Count measure that counts the number of Products.

The user would like to write a calculated measure that works out the number of products that took <5 days, 5-10 days, 10-15 days etc.It would be easy to write a set of calculated measures for each of these bandings, but the user wants effectively a single dynamic attribute to use in the calculation in order to automatically distribute these values across the columns in their pivot table.

Is this even possible? I was thinking I could build an attribute on the Product Dimension in the ETL to do this quite easily, but the user wants to be able to change the bandings on the fly by changing the MDX for the attribute, rather than go back to the developer every time.

View 4 Replies View Related

Analysis :: SSAS Default Value Setting

Oct 29, 2015

how to achieve the below mentioned in SSAS: P

1 - Set Default values 20 and 80
2 -Set Default value <> 90 or except 90.

View 2 Replies View Related

Analysis :: What Is The Meaning Of Granularity In SSAS

May 6, 2015

I wanted to know the meaning of Granlatiy of Fact  with some example.

View 3 Replies View Related

Analysis :: Count Of Rows In SSAS MDX Query

Sep 17, 2015

I need to find the percentile using cube so i am using the below formula :

((n-1) * p /100) -1

n= count of number of array records
p= percentile

I am using below MDX query:

WITH MEMBER [Measures].[PV] AS 25
Member [Measures].[CntCT] as Count(NonEmpty([Tb City].[City Name].&[DC], [Measures].[CPT1]))
Member [Measures].[PVInt25] as  Int(((([Measures].[CntCT] - 1)* [Measures].[PV])/100) - 1)
Member [Measures].[PVC] as ([Measures].[CPT1],Order(NonEmpty([Tb City].[City Name].&[DC],[Measures].[CPT1]),
[Measures].[CPT1],ASC).Item([Measures].[PVInt25]))

Select [Measures].[PVC] on columns, {[Tb City].[City Name]} on rows from test;

The line 2:
Member [Measures].[CntCT] 

In that i need to find the n count of rows where city is DC (City is my Dimension) in Measures CPT1

But currently it is giving the result 1 instead in actual in my test cube there is the city DC exists with 23 CPT1 rows count.

I tried the below query:

SELECT NON EMPTY {[Tb City 1].[City Name].[City Name].&[DC]  } 
   ON COLUMNS, NON EMPTY { ( [Measures].[Tb Main Count] ) }
 ON ROWS FROM [test]

Above query gives me the correct count i.e. 23 but i need to get the result of above query in line 2 of MDX query:

Member [Measures].[CntCT] 

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved