Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
showy
Helper II
Helper II

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?


showy_0-1750248818749.png

 

showy_1-1750248852956.png

 

1 ACCEPTED SOLUTION

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.

View solution in original post

6 REPLIES 6
v-pagayam-msft
Community Support
Community Support

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.

mh2587
Super User
Super User

You can do this without duplicating the Date table by Using the USERELATIONSHIP() function to activate the inactive relationship
for more details follow the following article:
https://learn.microsoft.com/en-us/dax/userelationship-function-dax


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



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

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.

hi @showy 

You can activate the relationships in DAX code using the USERELATIONSHIP function.

 

For example, if you are evaluating a measure using createddate then that is the active date so you dont need to do anything.

At the same time you can evaluate a measure on document date (without changing the phisical relationships) by using the USERELATIONSHIP function.  Both will work at the same time.

 

Example on document date:

 

YouMeasureName = CALCULATE(YourMeasure, USERELATIONSHIP(Date'Date, YourFactTable'DocumentDate)

 

This will enable the relationship in code. HTH

hi @m4ni 

this post is not about to create a measure or evaluate any values. Its about to controll the visuals.

On the one hand some visuals are based on creation date on the other hand other visuals are controlled by the document date.

The question is how to handle this topic with datetabel(s).


Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

OSZAR »