显示标签为“dimension”的博文。显示所有博文
显示标签为“dimension”的博文。显示所有博文

2012年3月29日星期四

Display a KPI need the same Dimension on its Value and Target?

I mean, I have a KPI, it's value is set to a measure of a measuregroup based on a facttable A. and it's Target is set to a measure of another measuregroup based on another facttable B.

Now I want to display the KPI, with a given dimension's slice. My question is, is it needed that the dimension I chose must be shared by both the measures of KPI's Value and Target? For an example, If I dispaly the KPI with the Promotion Dimention, and the Promotion Dimention has a relation to the KPI's Value's related measure(There's a PromotionKey column in facttable A; ), but it has no relation to the KPI's Target's related measure(There's NOT a PromotionKey column in facttable B).

Could I do so?

I think this is SSAS question. I moved it to the SSAS forum...|||

OK.

Help, Help! Thanks.

|||

The KPI should work similarly to the underlying measures - so, in your example, the KPI Target behavior will depend on how the IgnoreUnrelatedDimensions property of the "facttable B" Measure Group is set. If true (default), then the KPI Target should be unaffected by slicing the Promotion dimension; if false, the KPI Target should become null.

http://sqljunkies.com/WebLog/mosha/archive/2005/12/31/cube_init.aspx

>>

Default members, MDX Scripts, Security, KPIs and Perspectives

...

KPI trigger creation of hidden calculated measures only if the MDX expression for the KPI property is not a simple reference to some measure (either calculated or physical). However, if the expression is a simple reference, such as [Measures].[Sales], then no hidden calculated measure will be created, and KPIValue, KPIGoal, KPITrend etc functions will simply return that measure.

>>

http://msdn2.microsoft.com/en-us/library/ms365411.aspx

>>

Configuring Measure Group Properties

...

IgnoreUnrelatedDimensions

Determines whether unrelated dimensions are forced to their top level when members of dimensions that are unrelated to the measure group are included in a query. Default setting is True.

>>

|||Thanks! that's what i am looking for! Thank you, Puri.

Dispalying AS2005 Parent-child hierarchy with RS2005

Hello,

in AdventureWorksDW at Dimemployee there is a parent-child dimension.

If I use the browse Tab in VS, I can browse all the levels of that hierarchy.

My question is How do I produce this kind of report with RS2005 sp1?

I need the report to behave the same as the browser of VS, meaning that the level depth can change.

I looked all over the web, but didn't find any solution.

Thanks,

Yoav.

Your problem is to fetch all data of parent-child dimension in a single query oi order to fit it in sinlgle SSRS report. I suppose that such solution won't satisfy you. You schould develop report getting data from SSAS by demand, not all-in-one query.|||I had the same problem. From I've been reading Reporting Services has limited functionality when dealing with Analysis Services including the parent-child relationship.

In analysis services I never designated a parent-child relationship, I just simply put the appropriate keys into the cube. That way Reporting Services can do the hierarchy just like it does for aregular SQL query.

The query should return an ID and a Parent ID. In RS create a table with just the Details row (just now at least). In the properties put the group on being the ID and the Parent being the parent ID.

For more info checkout:
http://www.codeguru.com/csharp/.net/net_data/sortinganditerating/article.php/c12223/|||

If this not is working with a SSAS2005 cube you can query the data mart/source system with a TSQL CTE(Common Table Expression). I know that this is an OLAP forum but if nothing else works try the examples i SSRAS2005 that you find on this link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql_05TSQLEnhance.asp

HTH

Thomas Ivarsson

|||

Hi,

thanks for the answer .

I asked if there is an option to use the hierarchy of AS?

I know how to produce RS parent-child reports.

is this the only option?

2012年3月22日星期四

Discussion about how to create a fact drillthrough dimension the best way..

I have been running into some troubles creating a fact drillthrough dimension. The scenario is as follows:

You have a fact table (in this case with around 50 million rows) holding accounting data. Within that facttable you have a column that holds some information in a free text field (let's say varchar(150) and name "Account_information") that is useful for the business user when they want to do a drillthrough on a cell in the cube.

Now how would you design your cube to be able to drillthrough to that information ?

The solution, the way i see it, is to create fact dimension containing those 50 million rows....

The fact table(Fact_Finance) looks like this

Unique_ID(int), Account_information (varchar(150)), Amount, Column_x....Column_y

In the DSV i then add a view that is a "Select Unique_ID, Account_information from Fact_Finance)

With that view i then create a dimension with

Attribute keycolumn = Unique_ID and

Attribute namecolumn = Account_information

Setting the dimension to processmode ROLAP often results in a timeout in the 3. part front-end tool, so in my case the only option is to use molap for the dimension.

To be able to add the Attribute in the Action i need to add the dimension in the dimension structure, binding the Unique_ID from the dimension to the Fact_Finance table. To me that seems to dramaticly slow down browsing the cube - comments ?

The Molap process of the drillthrough dimension becommes pretty heavy with a select distinct on the varchar column, even with index created though the Data Tuning Wisard.

I hope that someone can comment on their experience with creating a fact drillthrough dimension, since this approach has a big impact on both the processing and browsing of the cube

"To be able to add the Attribute in the Action i need to add the dimension in the dimension structure, binding the Unique_ID from the dimension to the Fact_Finance table. " - are you saying that the fact dimension is configured with a regular relation (not a fact relation) to the measure group? This shouldn't be necessary - for example, the "Reseller Details" action in Adventure Works returns attributes from the fact dimension.

Another option worth trying (if you have Enterprise Edition) is to create a (text) measure with AggregateFunction of "None" on the Account_Information field (rather than configuring it as the name of the fact key attribute). This measure can be included in the drillthorugh action return list.

|||

If I try that i'll get the following error:

Error 1 Errors in the metadata manager. The data type of the 'Account_Description' measure is not valid because the data type of the measure is a string type.

AggregationType set to None

Datatype is WChar

I'm trying to run in the Developer edition.

|||

Looks like you're right - when I set up a test scenario, I got the same error as well. This approach was suggested in an earlier thread here:

the attributes of Fact Table could not be displayed when drill through?

>>

...

Sure you have got a huge dimension.
But you shouldn't create dimension, you can make text measure.

...

You can also create a non aggregated measure and then use that when drilling through.
>>

So scratch that - here's another thread on a similar subject, with an approach from (ahem) a more authoritative source:

String measures in Analysis services cube

>>

...

The usual workaround in both AS2000 and AS2005 for such requirement is to create hidden dimension TextDescriptions with integer key and string name, i.e. you will have dimension table as

Key Name

1 Optimal

2 Needs Improvement

3 Failed

...

You will also have hidden measure DescriptionKey in the cube.

Then you use integers as a measure, and create calculation for it, like following:

CREATE MEMBER CURRENTCUBE.Measures.Description AS

' IIF(DescriptionKey = 0, "",

Filter(TextDescriptions.MEMBERS, Val(TextDescriptions.CurrentMember.Properties("Key"))=Measures.DescriptionKey).Item(0).Item(0).Name)


Mosha - http://www.mosha.com/msolap
>>

Another approach which I've used recently is to add a text attribute to the fact table, with its attribute hierarchy disabled. But in this case, since the client tool is Excel 2003, users don't access this text via drillthrough - instead, the fact dimension is directly added (after appropriate slices have been set, of course) on the rows of a pivot table. The text is then dropped in the data area, using a calculated measure which references the Member Property for the text. Excel 2003 allows a Member Property to be added to a pivot table as well, but I found this to be slower and less obvious than a calculated text measure.

The Analysis Services 2005 Performance Guide discusses when to disable an attribute hierarchy:

...

Reducing attribute overhead

...

Turn off the attribute hierarchy and use member properties

As an alternative to attribute hierarchies, member properties provide a different mechanism to expose dimension information. For a given attribute, member properties are automatically created for every attribute relationship. For the primary key attribute, this means that every attribute that is directly related to the primary key is available as a member property of the primary key attribute.

If you only want to access an attribute as member property, once you verify that the correct relationship is in place, you can disable the attribute’s hierarchy by setting the AttributeHierarchyEnabled property to False. From a processing perspective, disabling the attribute hierarchy can improve performance and decrease cube size because the attribute will no longer be indexed or aggregated. This can be especially useful for high cardinality attributes that have a one-to-one relationship with the primary key. High cardinality attributes such as phone numbers and addresses typically do not require slice-and-dice analysis. By disabling the hierarchies for these attributes and accessing them via member properties, you can save processing time and reduce cube size.

Deciding whether to disable the attribute’s hierarchy requires that you consider both the querying and processing impacts of using member properties. Member properties cannot be placed on a query axis in the same manner as attribute hierarchies and user hierarchies. To query a member property, you must query the properties of the attribute that contains the member property. For example, if you require the work phone number for a customer, you must query the properties of customer. As a convenience, most front-end tools easily display member properties in their user interfaces.

...

Discussion about how to create a fact drillthrough dimension the best way..

I have been running into some troubles creating a fact drillthrough dimension. The scenario is as follows:

You have a fact table (in this case with around 50 million rows) holding accounting data. Within that facttable you have a column that holds some information in a free text field (let's say varchar(150) and name "Account_information") that is useful for the business user when they want to do a drillthrough on a cell in the cube.

Now how would you design your cube to be able to drillthrough to that information ?

The solution, the way i see it, is to create fact dimension containing those 50 million rows....

The fact table(Fact_Finance) looks like this

Unique_ID(int), Account_information (varchar(150)), Amount, Column_x....Column_y

In the DSV i then add a view that is a "Select Unique_ID, Account_information from Fact_Finance)

With that view i then create a dimension with

Attribute keycolumn = Unique_ID and

Attribute namecolumn = Account_information

Setting the dimension to processmode ROLAP often results in a timeout in the 3. part front-end tool, so in my case the only option is to use molap for the dimension.

To be able to add the Attribute in the Action i need to add the dimension in the dimension structure, binding the Unique_ID from the dimension to the Fact_Finance table. To me that seems to dramaticly slow down browsing the cube - comments ?

The Molap process of the drillthrough dimension becommes pretty heavy with a select distinct on the varchar column, even with index created though the Data Tuning Wisard.

I hope that someone can comment on their experience with creating a fact drillthrough dimension, since this approach has a big impact on both the processing and browsing of the cube

"To be able to add the Attribute in the Action i need to add the dimension in the dimension structure, binding the Unique_ID from the dimension to the Fact_Finance table. " - are you saying that the fact dimension is configured with a regular relation (not a fact relation) to the measure group? This shouldn't be necessary - for example, the "Reseller Details" action in Adventure Works returns attributes from the fact dimension.

Another option worth trying (if you have Enterprise Edition) is to create a (text) measure with AggregateFunction of "None" on the Account_Information field (rather than configuring it as the name of the fact key attribute). This measure can be included in the drillthorugh action return list.

|||

If I try that i'll get the following error:

Error 1 Errors in the metadata manager. The data type of the 'Account_Description' measure is not valid because the data type of the measure is a string type.

AggregationType set to None

Datatype is WChar

I'm trying to run in the Developer edition.

|||

Looks like you're right - when I set up a test scenario, I got the same error as well. This approach was suggested in an earlier thread here:

the attributes of Fact Table could not be displayed when drill through?

>>

...

Sure you have got a huge dimension.
But you shouldn't create dimension, you can make text measure.

...

You can also create a non aggregated measure and then use that when drilling through.
>>

So scratch that - here's another thread on a similar subject, with an approach from (ahem) a more authoritative source:

String measures in Analysis services cube

>>

...

The usual workaround in both AS2000 and AS2005 for such requirement is to create hidden dimension TextDescriptions with integer key and string name, i.e. you will have dimension table as

Key Name

1 Optimal

2 Needs Improvement

3 Failed

...

You will also have hidden measure DescriptionKey in the cube.

Then you use integers as a measure, and create calculation for it, like following:

CREATE MEMBER CURRENTCUBE.Measures.Description AS

' IIF(DescriptionKey = 0, "",

Filter(TextDescriptions.MEMBERS, Val(TextDescriptions.CurrentMember.Properties("Key"))=Measures.DescriptionKey).Item(0).Item(0).Name)


Mosha - http://www.mosha.com/msolap
>>

Another approach which I've used recently is to add a text attribute to the fact table, with its attribute hierarchy disabled. But in this case, since the client tool is Excel 2003, users don't access this text via drillthrough - instead, the fact dimension is directly added (after appropriate slices have been set, of course) on the rows of a pivot table. The text is then dropped in the data area, using a calculated measure which references the Member Property for the text. Excel 2003 allows a Member Property to be added to a pivot table as well, but I found this to be slower and less obvious than a calculated text measure.

The Analysis Services 2005 Performance Guide discusses when to disable an attribute hierarchy:

...

Reducing attribute overhead

...

Turn off the attribute hierarchy and use member properties

As an alternative to attribute hierarchies, member properties provide a different mechanism to expose dimension information. For a given attribute, member properties are automatically created for every attribute relationship. For the primary key attribute, this means that every attribute that is directly related to the primary key is available as a member property of the primary key attribute.

If you only want to access an attribute as member property, once you verify that the correct relationship is in place, you can disable the attribute’s hierarchy by setting the AttributeHierarchyEnabled property to False. From a processing perspective, disabling the attribute hierarchy can improve performance and decrease cube size because the attribute will no longer be indexed or aggregated. This can be especially useful for high cardinality attributes that have a one-to-one relationship with the primary key. High cardinality attributes such as phone numbers and addresses typically do not require slice-and-dice analysis. By disabling the hierarchies for these attributes and accessing them via member properties, you can save processing time and reduce cube size.

Deciding whether to disable the attribute’s hierarchy requires that you consider both the querying and processing impacts of using member properties. Member properties cannot be placed on a query axis in the same manner as attribute hierarchies and user hierarchies. To query a member property, you must query the properties of the attribute that contains the member property. For example, if you require the work phone number for a customer, you must query the properties of customer. As a convenience, most front-end tools easily display member properties in their user interfaces.

...

2012年3月20日星期二

Discretization method question

Hi,

I wonder what type of expression I could use in the Discretization method property of a dimension attribute to achieve a custom grouping.

As an example, I have a margin % measure that I would also have available as a discretized dimension.

I guess first step would be to create a calculated member where the parent hierarchy would be dimension, then use discretization to specify something like

less than 0%
between 0% and 15%
greater than 15% and lower or equal 30%
greater than 30%

Any example out there?

Thanks,

Philippe

This article should explain it:

http://msdn2.microsoft.com/en-us/library/ms174810.aspx

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