Friday, March 23, 2012

I want to show sales price

Hello

I have a cube and I need to show sales price but if I use like atributte i can show the sales price at the moment sale.

Can you heep me?

Please,

can you post more details to better understand your problem?

Francesco

|||

Sorry but my English is not good.

I have a Dimension Product and Sales Fact Table

My DIm have this attributes: Album, Artist ,Track Name and Price

My Fact Table has this columns PoroductID, Quanty, SalesPrice, Total

And in the fact table I calculate the total to avoid make a calculated mesure.

But the price can change in the future, and I need a Report like this

Track Name, Quantity, Price, Total

I love you, 3, $5.00, $15.00

But if the price chnge in the future. How Can I show the Price at the moment of the sale.

Thanks

|||

Well I'll try to make the things simple...

You have a fact table with a foreign key to your dimension table.

Some information are stored in the fact table (your facts/measures) and others (attributes of facts) are stored in dimension table.

Usually you have a date dimension because you make a "snapshot" of your facts and put it into your fact table, so you have to record the date of that snapshot.

Well, in your case, if I've understood, you have a "SalesPrice" that is your fact.

Probably you record in that column the value of the price at the moment of the sale.

So if you query that value for a certain date you'll obtain the value of the price at "that" date.

In the dimension you'll record the price of the product at the date .... it depends from what kind of dimension (or what kind of update you usally do to that dimension)

If you have a SCD (Slowly Changing Dimension) type I you update the value every time you update dimension so you'll have ever the last value

If you choose a SCD type II you'll register every changing in dimension value adding new member. In this way you record all the story of the dimension because every member is a "snapshot" at a certain date of the entity it represent.

As I told the story is longer, but you can find more information on BOL, on the WEB and in almost every book about SSAS.

Francesco

|||

Thanks a lot!!

|||

Hello Again

I nedd to show the TOP 100 most sales tracks.

Do you have an idea?

Thanks

sql

No comments:

Post a Comment