Tuesday, February 14, 2012

Date and text fields in 'Measures' Area

Hi,

I have a fact table like this:

Account No. CreatedDate CreatedBy Amount

1 1/1/2007 serene 1000

2 2/2/2007 mike 2000

.

.

What I want to see in my Cube Browser is an Account on the row side and CreatedDate, CreatedBy and Amount on the 'Measures' Area. Is it possible?

cherriesh

You would not want to setup the CreatedDate and CreatedBy fields as measures, these fields are not aggregateable and really only relate to the Account dimension. What you would want to do is to set them up as attributes in the Account dimension. You could disable them if you did not want explicit analysis done on these fields and only wanted them accessed as member properties.

You might also be able to setup the CreatedDate as a referenced dimension, if you wanted to analyze the creation dates at different levels (like years/quarters/months etc) - if you already have a Date dimension you might be able to reuse it.

|||

Hi,

how does the first scenario work? i should make my fact table as dimension also? how to disable the attribute? thanks a lot for the help!

cherriesh

|||

I'm assuming that you would have some sort of Account dimension table with fields like

AccountId

AccountNo

CreatedBy

CreatedDate

And then a fact table with the dimension keys and the measures

AccountId

DateId

Amount

I'm not sure what your "Amount" is relating to in this example, but if it was a transaction at a point in time then you would not want to be storing the repeated CreatedBy and CreatedDate fields each time a transaction occurred.|||

It's like this...

I have a header table, say, ServiceJob, with the following structure:

ServiceJob ReceivedDate CollectedDate

1 1/1/2007 1/3/2007

2 2/2/3007 2/3/2007

And I have a Service Job Item table:

ServiceJob ServiceJobLineNumber Item Labor Cost Others Cost

1 1 A 1000 200

2 B 700 50

2 1 A 300 900

I want to have this look in my Cube Browser:

Service Job | ReceivedDate CollectedDate LaborCost Others Cost

1 | 1/1/2007 1/3/2007 1700 250

2 | 2/2/3007 2/3/2007 300 900

Service Job is on row side while received date, collected date labor cost and others cost are in the measure side.

can i do that?

cherriesh

|||

You can have multiple attributes on the row axis, so your result set would look like the following, with 3 attributes in the row axis and 2 measures.

Service Job ReceivedDate CollectedDate | LaborCost Others Cost

1 1/1/2007 1/3/2007 | 1700 250

2 2/2/3007 2/3/2007 | 300 900

ReceivedDate and CollectedDate should probably either be dimensions in their own right or attributes of the ServiceJob. Dates don't really "work" well as measures as you cannot aggregate them.

No comments:

Post a Comment