Forum Discussion

Godseyma's avatar
Godseyma
Regular Visitor
2 years ago
Solved

Missing Data

  I have uploaded the last 3 fiscal years worth of data and everything seems to checkout , however I am missing some info. I have checked my relationships between tables and everything seems t...
  • TomMartens's avatar
    2 years ago

    Hey Godseyma 

     

    this often indicates that values from the column of the many side (the fact table) of a relationship are missing in the column on the one side of the relationship (the dimension table). Rephrasing this means, the dimension table products contains the values P1, P2, but the fact table has values for P1, P2, and P3.

     

    Assuming I have a very simple model that looks like this:

    As you can see, there is a fact row with p3, but p3 is not in the dimension table. Building a simple table visual yields the below result:

    This issue can be tracked down by creating a calculated column in the fact table using the following DAX:

     

     

    _check product key = 
    IF( ISBLANK( RELATED( 'dim product'[productkey] ) ), "value is missing in product dimension" , "everything is fine" )

     

     

    Now, using this calculated column in combination with the productkey column from the fact table helps to track the missing value:

     

    The missing value will also appear if you use the column productcolor from the dimension table:

    First check if all product keys are present in the dimension table, then you have to look for empty productcolors values in your dimension table.

     

    If your semantic model is more complex, and there are relationships with the dimension table, as in fact --> product --> prouct subcategory  --> product category, the tracking will become more cumbersome 😉, but the approach will the same.

     

    Hopefully, this will help to tackle your challenge.

     

    Regards,

    Tom