简体   繁体   中英

Wrong link between Fact and Dim table SSAS

We have a problem with a Fact table in our cube. We know it is not the best practice of developing a Dimensional db but we have dimension and fact table combined in 1 table. This is because Dimensional data isn't much (5 fields). But moving on to the problem. We have added this table to our cube and for testing we added 1 measure(count of rows). . Like the image says we have the grand total for every sub category this isn't correct.

错误的行数 .

Does anyone have an idea where we have to look for the problem.

Kind regards, Phoenix

You have not defined a relationship between your sub category dimension and your fact table. That has resulted in the full count mapping to all of the sub category attributes, hence the same value repeating

  1. Add a relation between cube measure group and your dimension on the second tab (Dimension Usage) in cube (It's 'regular' and key-level on both sides in most cases).
  2. If this relation is exist try to recreate it again. Sometimes it happens after several manual changes in 'advanced' mode.
  3. Check dimension mapping in fact table. If everything is ok, try to add new dimension with only one level the first time, than add another one etc. I know it sounds like shaman tricks but still...

And always use SQL Server Profiler on both servers (SQL, SSAS) to capture exact query that returns wrong value. Maybe the mistake is somewhere else.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM