I'm having a performance issue with my data model and trying to figure out if it's just a bad design or if there is some solution that I'm missing.
My model consists of a fact table containing Customer Code, Product Code, Value Type (i.e. Volume, Revenue, Cost), Value, and a few attributes (i.e. market, geography, etc.) like below
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product Code
[/TD]
[TD]Customer Code
[/TD]
[TD]Value Type
[/TD]
[TD]Value
[/TD]
[TD]Market Code
[/TD]
[TD]Geography Code
[/TD]
[/TR]
[TR]
[TD]Prod1
[/TD]
[TD]Cust1
[/TD]
[TD]Revenue
[/TD]
[TD]100
[/TD]
[TD]AA
[/TD]
[TD]US1
[/TD]
[/TR]
[TR]
[TD]Prod2
[/TD]
[TD]Cust1
[/TD]
[TD]Revenue
[/TD]
[TD]200
[/TD]
[TD]BB
[/TD]
[TD]US2
[/TD]
[/TR]
[TR]
[TD]Prod3
[/TD]
[TD]Cust2
[/TD]
[TD]Revenue
[/TD]
[TD]50
[/TD]
[TD]CC
[/TD]
[TD]US3
[/TD]
[/TR]
[TR]
[TD]etc.
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
This table is 1.9 million rows.
Then, I have related dimension tables, relating to the Customer, Product, and each Attribute column of the fact table.
The largest of the dimension tables are Customer (6,000 rows) and Product (1,400 rows) - the rest are only a few hundred rows.
I have measures written to sum based on the Value Type, for instance
= CALCULATE( SUM( Fact[Value] ), Fact[Value Type] = "Revenue" )
Now, if I drag in my customer from the Customer dimension table into a pivot, it calculates my measures near instantly.
If I then add Product from the Product table, it completely hangs and runs out of memory or else takes an excessively long time to run (minutes, way too long for an average user to wait).
I assume this is because PowerPivot is calculating for every possible combination of Customer x Product (6,000 x 1,400 = 8.4M combinations).
This much be a common issue with models like this and wondering how do I overcome this? I prefer not to flatten the entire model into one table as I have many dimension levels that are much cleaner to view on their own. But as it stands, it basically is inoperable if trying to view Customer + Product combination level of detail.
Am I missing something here?
Thanks
My model consists of a fact table containing Customer Code, Product Code, Value Type (i.e. Volume, Revenue, Cost), Value, and a few attributes (i.e. market, geography, etc.) like below
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product Code
[/TD]
[TD]Customer Code
[/TD]
[TD]Value Type
[/TD]
[TD]Value
[/TD]
[TD]Market Code
[/TD]
[TD]Geography Code
[/TD]
[/TR]
[TR]
[TD]Prod1
[/TD]
[TD]Cust1
[/TD]
[TD]Revenue
[/TD]
[TD]100
[/TD]
[TD]AA
[/TD]
[TD]US1
[/TD]
[/TR]
[TR]
[TD]Prod2
[/TD]
[TD]Cust1
[/TD]
[TD]Revenue
[/TD]
[TD]200
[/TD]
[TD]BB
[/TD]
[TD]US2
[/TD]
[/TR]
[TR]
[TD]Prod3
[/TD]
[TD]Cust2
[/TD]
[TD]Revenue
[/TD]
[TD]50
[/TD]
[TD]CC
[/TD]
[TD]US3
[/TD]
[/TR]
[TR]
[TD]etc.
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
This table is 1.9 million rows.
Then, I have related dimension tables, relating to the Customer, Product, and each Attribute column of the fact table.
The largest of the dimension tables are Customer (6,000 rows) and Product (1,400 rows) - the rest are only a few hundred rows.
I have measures written to sum based on the Value Type, for instance
= CALCULATE( SUM( Fact[Value] ), Fact[Value Type] = "Revenue" )
Now, if I drag in my customer from the Customer dimension table into a pivot, it calculates my measures near instantly.
If I then add Product from the Product table, it completely hangs and runs out of memory or else takes an excessively long time to run (minutes, way too long for an average user to wait).
I assume this is because PowerPivot is calculating for every possible combination of Customer x Product (6,000 x 1,400 = 8.4M combinations).
This much be a common issue with models like this and wondering how do I overcome this? I prefer not to flatten the entire model into one table as I have many dimension levels that are much cleaner to view on their own. But as it stands, it basically is inoperable if trying to view Customer + Product combination level of detail.
Am I missing something here?
Thanks
Last edited: