Forum Discussion

bw_chec's avatar
bw_chec
Icon for Helper I rankHelper I
1 year ago
Solved

Add 'Unknown' row to dimension tables

Hi,   I have a fact table with a service_id to dim_service. Some historic services are now no longer used, so are not in dim_service. I want to create a 'No longer used' row to group all of these r...
  • Sergii24's avatar
    1 year ago

    Hi bw_chec, assuming you have the following semantic model:

     

    all unmatched rows in fact will be grouped under row "blank" in dimension.

    • You don't need to add any blank row to dim table to obtain this result.
    • Depending on visual, measure(s) used and etc. you might need to forse its visibility, because by default blank row is hidden

    If you want to gorup all unmatched values under a row with a name different from blank (like "no longer used") you'd need to add these rows to dim table (there are multiple ways to do it) and then group them together (i.e. having a row with ID 13 and a column with a value "no longer used". For existing values, depending on your use case you can group them by writing in a new column "exist" or referencing ID, so writing there value 12 and etc.)

    Good luck with your project!