Showing posts with label dimension. Show all posts
Showing posts with label dimension. Show all posts

Wednesday, March 28, 2012

How to change the column measure into Row Measure in Reporting services

Hi,

I am wondering how to create a matrix that contains 1 dimension for Top Label (Column), let's say "Year-Month"

and then 2 Measure to be in the row format rather than columnar format.

Example as below :

Year-Month on the column, and the measure is on the row :

2007-04 2007-05 2007-06 Amount Sales 1000 2000 3000 Unit Sales 10 20 30 Total 1010 2020 3030

Please share with me if you have this solution in Reporting services as it works in excel, hyperion brio, bo, cognos but somehow cannot see that function in Reporting Services.

Thanks

best regards,

Tanipar

This is easily supported (no need to quote every other tool under the sun to prove your piont).

You just have to drag the field from the dataset window to the right area and drop when you see a horizontal bar

Wednesday, March 7, 2012

How to calculate the percentage?

In my cube, I've a date dimension and a time dimension. I would like to know how can I calculate the percentage of order count for a specific time?

I can get this.

Hour11/6/0611/7/069am601010am801011am6020

But how can I get this.

Hour11/6/0611/7/06

9am30%25%

10am40%25%

11am30%50%

I would like to use the calculation feature in available in the cube. How can I do this? Thanks!

Depends on whether the percentage is always based on the time hierarchy, regardless of which query axis it lies on, or is based on whichever hierarchy is on rows - Axis(1). In the former case, something like:

Member [Measures].[OrderFractionByTime] as

'[Measures].[Order Count]/

([Measures].[Order Count], [TimeOfDay].Parent)',

FORMAT_STRING = "Percent"

|||Hi Deepak,

Thanks for your reply but there are something that I don't understand. In your code, you use [TimeOfDay].Parent in the member calculation. However, in my own cube, the date dimension and time dimension are 2 separate dimensions. So, I don't expect my TimeOfDay.Parent will get the expected set.

The following is my Date and Time dimensions structure.
DimDate - The Date dimension is populated by extracting data from my OLTP.
Year
Month
DayOfMonth
Date
DayNameOfWeek

DimTime - The Time dimension is generated by cross join all the available hour, minute and second. (No. of records: 24 x 60 x 60)
Hour
Minute
Second

P.S. I'm quite new to BI and datawarehouse. If my Time hierarchy is not correct or using best practice, please let me know so that I can improve it.

Regards,
Alex|||

Hi Alex,

Are you using AS 2000 or AS 2005 - if it's AS 2000, then something like:

Member [Measures].[OrderFractionByTime] as

'[Measures].[Order Count]/

([Measures].[Order Count], [DimTime].Parent)',

FORMAT_STRING = "Percent"

|||Hi Deepak,

I'm using AS 2005. The problem that I don't understand what [DimTime].Parent is pointing to. The Time dimension and Date dimension doesn't have any direct relationship in my cube. Is there any design fault?

Regards,
Alex|||

Alex,

With AS 2005, the hierarchy should also be specified with [DimTime], so [DimTime].[TimeHierarchy].Parent points to the parent of the current [DimTime] member. For example, the parent of the hour "01" will be [DimTime].[TimeHierarchy].[All].

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

>>

SQL Server 2005 Books Online

Parent (MDX)

Updated: 17 July 2006

Returns the parent of a member.

...

>>

How to calculate the percentage?

In my cube, I've a date dimension and a time dimension. I would like to know how can I calculate the percentage of order count for a specific time?

I can get this.

Hour11/6/0611/7/069am601010am801011am6020

But how can I get this.

Hour11/6/0611/7/06

9am30%25%

10am40%25%

11am30%50%

I would like to use the calculation feature in available in the cube. How can I do this? Thanks!

Depends on whether the percentage is always based on the time hierarchy, regardless of which query axis it lies on, or is based on whichever hierarchy is on rows - Axis(1). In the former case, something like:

Member [Measures].[OrderFractionByTime] as

'[Measures].[Order Count]/

([Measures].[Order Count], [TimeOfDay].Parent)',

FORMAT_STRING = "Percent"

|||Hi Deepak,

Thanks for your reply but there are something that I don't understand. In your code, you use [TimeOfDay].Parent in the member calculation. However, in my own cube, the date dimension and time dimension are 2 separate dimensions. So, I don't expect my TimeOfDay.Parent will get the expected set.

The following is my Date and Time dimensions structure.
DimDate - The Date dimension is populated by extracting data from my OLTP.
Year
Month
DayOfMonth
Date
DayNameOfWeek

DimTime - The Time dimension is generated by cross join all the available hour, minute and second. (No. of records: 24 x 60 x 60)
Hour
Minute
Second

P.S. I'm quite new to BI and datawarehouse. If my Time hierarchy is not correct or using best practice, please let me know so that I can improve it.

Regards,
Alex|||

Hi Alex,

Are you using AS 2000 or AS 2005 - if it's AS 2000, then something like:

Member [Measures].[OrderFractionByTime] as

'[Measures].[Order Count]/

([Measures].[Order Count], [DimTime].Parent)',

FORMAT_STRING = "Percent"

|||Hi Deepak,

I'm using AS 2005. The problem that I don't understand what [DimTime].Parent is pointing to. The Time dimension and Date dimension doesn't have any direct relationship in my cube. Is there any design fault?

Regards,
Alex|||

Alex,

With AS 2005, the hierarchy should also be specified with [DimTime], so [DimTime].[TimeHierarchy].Parent points to the parent of the current [DimTime] member. For example, the parent of the hour "01" will be [DimTime].[TimeHierarchy].[All].

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

>>

SQL Server 2005 Books Online

Parent (MDX)

Updated: 17 July 2006

Returns the parent of a member.

...

>>

Friday, February 24, 2012

how to build share dimension

in a project ,i built two cube,each cube need time dimension,i want the time dimension be a share dimension.how to do it?

What version of Analysis Services are you using?

In AS 2005 open your project in BI Dev Studio. Open your cube. Right click in the dimensions tab and select "Add cube dimensions".

Make sure you go into Dimension usage tab later and specify how your dimension is assosiated with the measure group.

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

Sunday, February 19, 2012

How to build a 10 best topcount...?

I'm beginer. I want to build a 10 best brands unit sales in (Foodmart database). where do I start?(From sales cube or shared dimension), pls experts told how to do it?

Use Topcount MDX function.

For example

SELECT TopCount
({[Geography].[Geography].[City].Members
*[Date].[Fiscal].[Fiscal Year].[FY 2003]}
, 5
, [Measures].[Reseller Sales Amount]
) ON 0,
[Product].[Product Categories].Bikes ON 1
FROM [Adventure Works]

See some more

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

http://cwebbbi.spaces.live.com/PersonalSpace.aspx?_c11_blogpart_blogpart=blogview&_c=blogpart&partqs=amonth%3D5%26ayear%3D2005

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

How to build a 10 best topcount...?

I'm beginer. I want to build a 10 best brands unit sales in (Foodmart database). where do I start?(From sales cube or shared dimension), pls experts told how to do it?

Use Topcount MDX function.

For example

SELECT TopCount
({[Geography].[Geography].[City].Members
*[Date].[Fiscal].[Fiscal Year].[FY 2003]}
, 5
, [Measures].[Reseller Sales Amount]
) ON 0,
[Product].[Product Categories].Bikes ON 1
FROM [Adventure Works]

See some more

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

http://cwebbbi.spaces.live.com/PersonalSpace.aspx?_c11_blogpart_blogpart=blogview&_c=blogpart&partqs=amonth%3D5%26ayear%3D2005

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