Forum Discussion

showy's avatar
showy
Helper II
1 year ago
Solved

How to handle 2 Datedimensions

Hi

 

I have the following question and would like to know how to edit the best practice.

 

I have data that has a creation date and a document date. Now there are evaluations that refer to the creation date and others that refer to the document date.

I would like to use the date values from the date dimension in the filters.

 

However, as the slicer only works with active relationships, I have made a copy of the date dimension and named one in DatedimensionCreateDate and one in DatedimensionDocumentDate and linked them to the fields in the fact table.

 

I then dragged the DatedimensionCreateDate [Date] into the filters for evaluations based on Creationdate and the field DatedimensionDocumentDate[Date] into the evaluations based on Documentdate.

 

 

Is this the right way or how do you deal with it if you have several dates in the fact tables?


 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi showy ,
    Thank you m4ni  and mh2587  for the insightful responses!

    Your current method of utilizing two separate date dimension tables one for CreateDate and another for DocumentDate is both valid and recommended when needed slicers to filter visuals based on different dates.

    Because slicers work only with active relationships, having distinct date tables ensures visuals are filtered correctly according to the relevant date field.

    While the USERELATIONSHIP() function is useful for measures that require calculations using an inactive relationship, it does not impact slicer behavior or filtering at the visual level.

    Hope this helps.

    Thank you.

6 Replies

    • showy's avatar
      showy
      Helper II

      Hi 
      the problem is that when the active relationship ist createAt and the inactive is documentdate only the filter for createAt[Date] will work.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi showy ,
        Thank you m4ni  and mh2587  for the insightful responses!

        Your current method of utilizing two separate date dimension tables one for CreateDate and another for DocumentDate is both valid and recommended when needed slicers to filter visuals based on different dates.

        Because slicers work only with active relationships, having distinct date tables ensures visuals are filtered correctly according to the relevant date field.

        While the USERELATIONSHIP() function is useful for measures that require calculations using an inactive relationship, it does not impact slicer behavior or filtering at the visual level.

        Hope this helps.

        Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi showy ,
    I just wanted to kindly follow up to see if you had a chance to review the previous response provided by us. I hope it was helpful. If yes, please Accept the answer so that it will be helpful to others to find it quickly.
    Thank you.