dbTalk Databases Forums  

Date Dimension syntax

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Date Dimension syntax in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim
 
Posts: n/a

Default Date Dimension syntax - 04-14-2004 , 10:09 AM






I have an incurred date field that I pull into my cube as
a dimension. I have created it as a standard dimension
instead of time dimension in order to give me more
flexibility using the date.

This dimension is one of about 10 dimensions within the
cube. The date in mm/dd/yyyy format. I am trying to use
the dimension to list dollar amounts in columns by the
incurred date. However, I want to list the dates by
mm/yyyy and not use the day field.

I have one level in the dimension to give me the format
mmm-yy. In the Member Key Column, I entered

"dbo"."RawExtr_FEP"."Incur_Date"

In the Member Name Name Column, I entered

LEFT(DATENAME(month, Incur_Date),3)+'-'+RIGHT(DATENAME
(year, Incur_Date),2)

This gave me the correct format I wanted however I am
getting mulitple columns with the same heading.

If I had 3 incurred payments in Dec, 2003 on the 10th,
15h, and 22nd, the output I get is.

Dec-03 Dec-03 Dec-03
75.00 100.00 25.00

What I need is

Dec-03
200.00

I tried copying the Member Name Column syntax into the
Member Key Column but I get an error telling me that is an
invaled column. Is there anyway to manipulate the syntax
of the Member Key Column field to drop the "day" part of
the date? Or somehow use another property setting to
group these three indivudual columns into one?

I do not have security authority to add any new fields to
my table or to create any views.

Thanks for your help.

Jim


Reply With Quote
  #2  
Old   
 
Posts: n/a

Default Date Dimension syntax - 04-15-2004 , 09:19 AM






Hi,

The reason you are getting multiple entries is because
although your format returns DEC-03, the underlying value
is a full date of 10/12/03, 15/12/03 and 22/12/03 - hence
three values are returned.

Try adding a level (or a member property) that gives you
the format you require? Time dimensions often have more
than one level that means basically the same thing
expressed differently - i.e. Period 1 - January

Ta
Paul


Quote:
-----Original Message-----
I have an incurred date field that I pull into my cube as
a dimension. I have created it as a standard dimension
instead of time dimension in order to give me more
flexibility using the date.

This dimension is one of about 10 dimensions within the
cube. The date in mm/dd/yyyy format. I am trying to use
the dimension to list dollar amounts in columns by the
incurred date. However, I want to list the dates by
mm/yyyy and not use the day field.

I have one level in the dimension to give me the format
mmm-yy. In the Member Key Column, I entered

"dbo"."RawExtr_FEP"."Incur_Date"

In the Member Name Name Column, I entered

LEFT(DATENAME(month, Incur_Date),3)+'-'+RIGHT(DATENAME
(year, Incur_Date),2)

This gave me the correct format I wanted however I am
getting mulitple columns with the same heading.

If I had 3 incurred payments in Dec, 2003 on the 10th,
15h, and 22nd, the output I get is.

Dec-03 Dec-03 Dec-03
75.00 100.00 25.00

What I need is

Dec-03
200.00

I tried copying the Member Name Column syntax into the
Member Key Column but I get an error telling me that is
an
invaled column. Is there anyway to manipulate the syntax
of the Member Key Column field to drop the "day" part of
the date? Or somehow use another property setting to
group these three indivudual columns into one?

I do not have security authority to add any new fields to
my table or to create any views.

Thanks for your help.

Jim

.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.