Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

Dimension Design faux-pas help with corrective surgery!

$
0
0
Ok all let me try to describe this problem effectively, it may be a struggle. It all starts with a table, called eforms. The table definition is below.[code="sql"]CREATE TABLE [dim].[Eforms]( [EformId] [bigint] IDENTITY(1,1) NOT NULL, [EformName] [varchar](50) NULL, [Question] [varchar](200) NOT NULL, [Answer] [varchar](4000) NULL, [CaseId] [numeric](18, 0) NOT NULL, CONSTRAINT [PK_LaganEforms] PRIMARY KEY CLUSTERED [/code]It's a table with a hierarchy, so every eformname has many questions, every question has many answers, answers may have many cases. In real life, 1 row is written for every answer per case, so case is the group.I've pulled this into a tabular cube as-is. The problem is, in hindsight, I actually wanted to pivot this data. I wanted questions to be columns, answers to be rows and for it to be one row per case. The problem is more eforms are added regularly, ergo questions, ergo columns. Additionally there are thousands of questions, so it would be impractical in analysis services to work with such a wide data-set.Is there anyway I can achieve the layout of information I want in tabular, or within a query pulling out the information to pivot it in the way I need? I feel that conceptually this should work - the data is all there it's just pushing it out properly. Frustrating that you can only create a pivot table in excel from data and not just 'a table' because that would work, too. It's a hard one to visualise I appreciate but if you think you [b]might [i][/i][/b]be able to help but need some clarity, please post and i'll try to describe the problem more clearly.

Viewing all articles
Browse latest Browse all 1341

Trending Articles