Forum Discussion

pbi_throw_away's avatar
pbi_throw_away
Frequent Visitor
3 years ago

Limit Date Dim Slicer Range

Trying to apply what I believe are "best practices", we have a DateDim table that ranges from 1900-01-01 until 9999-12-31. When I join my observation data set to the DateDim table and apply a slicer, the slicer range is from 1900-01-01 until 9999-12-31. In practice, my dataset starts from 2020-01-01 until yesterday. 

What is the correct way to control this? In practice, the database uses 1900-01-01 as a NULL value, so limiting those observations out is not ideal. However, the slicer options are massive because of the range of the DateDim table. Any guidance on the best way to make it easier for the user?

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    pbi_throw_away Two options. One, use the Date field from your fact table in your slicer. Second, create a column in your Date table like this and filter your slicer visual to 1:

    Column = 
      VAR __Count - COUNTROWS(RELATED('Fact Table'))
      VAR __Result = IF(__Count > 0, 1, 0)
    RETURN
      __Result