Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8933533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:33:46+00:00 2026-06-15T09:33:46+00:00

I’m about to design a data warehouse and a cube with a product dimension

  • 0

I’m about to design a data warehouse and a cube with a product dimension and a sales fact
table. The product dimension is a SCD (type 2).

Lets say the data in the product dimension looks like this the first year:

Name    |    Product Group    |    Year
A       |          A          |    2011
B       |          A          |    2011
C       |          B          |    2011

and like this the second year:

Name    |    Product Group    |    Year
A       |          A          |    2012
B       |          B          |    2012
C       |          C          |    2012

as you can see some of the products has changed product group between 2011 and 2012.

In the cube I want to ask two types of questions:

  • The easy one: How much did we sell for in each product group in 2011.

  • The hard one: How much did we sell for in each product group in 2011 if the products belonged to the product groups they have in 2012.

How would you design the warehouse and the cube do accomplish this?

Thanks!

Ps. I’m using SQL Server 2012

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:33:47+00:00Added an answer on June 15, 2026 at 9:33 am

    This can be treated as a type 3 SCD. Adding a column [Product Group 2011] allows answering these types of what-if questions.

    Name    |    Product Group  |  Product Group 2011  |    Year
    A       |          A        |          A           |    2012
    B       |          B        |          A           |    2012
    C       |          C        |          B           |    2012
    

    An alternative is to add a durable key to the product dimension and the sales fact.

    id | dur_id |    Name    |    Product Group  |    Year
    1  |    1   |    A       |          A        |    2012
    2  |    2   |    B       |          B        |    2012
    3  |    3   |    C       |          C        |    2012
    4  |    1   |    A       |          A        |    2012
    5  |    2   |    B       |          B        |    2012
    6  |    3   |    C       |          C        |    2012
    

    Then you can join from the SALES fact to the PRODUCT dimesion on the dur_id, just remember to restrict based off of the dimension Year.

    For SSAS, you could load in “duplicate” fact rows (i.e. the 2011 and 2012 fact rows associated with 2011, and again associated with 2012) You’d then need to make 2012 the default member for the [Year] attribute hierarchy, and prevent roll-ups that don’t specify the year.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to decide which would be the best data warehouse type design.
I am going to design a Data Warehouse and I heard about materialized views.
Is there an reference about how to properly design Table Storage data? What to
We've an SQL Server DB design time scenario .. we've to store data about
We're thinking about putting up a data warehouse system to load with web access
tl;dr general question about handling database data and design: Is it ever acceptable/are there
Providing design-time data for DataContext is easy with use of d:DataContext but what about
Q: I wanna to ask about report design issue. If my report data source
I'm learning about design patterns and in examples of code I've seen a convention
In a lot of articles about design, quirks mode is mentioned. Anybody have an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.