Forum Discussion
Strange SUMX Interaction With Date Dimension
Hello,
I have a measure that uses SUMX which works perfectly until I introduce the date column from a date dimension. Rows for the current month return the correct value whereas rows for previous months return blank values. When adding the date key from the fact table, all rows are calculated correctly until the date field from the dimension table is added. There is no date logic applied to the SUMX measure, no filtering, or any date interaction outside of the relational model.
The Model
I have a fact table for internal orders that contains Date, Product, Quantity
Product and Date Dimensions are joined on a 1-to-many relationship as to the fact table as expected
The Product table is also attached to a BOM Table via a bi-directional one-to-many relationship. The BOM table contains columns for the product, it's components, the component to product ratio, and some component attributes.
Relational Model for relevant tables
I need to build a table that shows the internal order quantity by component by date. This means looking into the BOM for the product against the internal order and multiplying the order quantity by the ratio.
I am using these Measures:
ParentQuantity = SUM('4.1 Fact Internal Orderlines'[QuantityToBuild])
- Anonymous4 years ago
ok.. 2 seconds after posting this I realised the problem. It was the many-to-many relationship on the date table to another fact table (which has year/month granularity). Putting the relationship inactive fixed the blank measure values.
1 Reply
- AnonymousNot applicable
ok.. 2 seconds after posting this I realised the problem. It was the many-to-many relationship on the date table to another fact table (which has year/month granularity). Putting the relationship inactive fixed the blank measure values.