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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
yellow_days
Helper I
Helper I

Role Play Dimension doesn't work

Hello,

 

I have a simple Star Schema and 3 Date Dimensions, which I want to integrate into one Role Play Dimension. So i changed my model and have instead of three, just one Date Dimension. But now I have trouble to analyse my data. If I select a measure in the facttable and choose the date dimension (and filter a certain date) i get empty result.

 

I checked the relationship between the fact and dimension and everything looks fine. Is there anything else, I forgot?

3 REPLIES 3
MFelix
Super User
Super User

Hi @yellow_days,

 

What type of error are you getting? How did you make the change to your model?

 

 

When you have more than one date and you want to make them refer to the same dimension date you can create a Datetable and then make the relationship between the Date Table and the 3 dates in your table but be aware the probably you should make them all inactive and then create your measure based on the USERRELATIONSHIP formula this way you can compare several dates within your model.

 

For example if you have a Start Date and End Date that you want to check the open / closed process in a given month this would be achievable by creating two measures like this:

 

Open =
CALCULATE (
    COUNT ( Projects[ID] );
    USERELATIONSHIP ( 'Calendar'[Date]; Projects[Start Date] )
)

Closed =
CALCULATE (
    COUNT ( Projects[ID] );
    USERELATIONSHIP ( 'Calendar'[Date]; Projects[EndDate] )
)

See the final result below:

 

relation.gif

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hello,

 

I only get an empty result. I just took a date table that references the fact table several times.

I would actually like to implement the Star Schema in a DWH and evaluate the data via a View. Do I need to make any of the changes you've mentioned in your comment or can I do it without it?

 

best regards

 

@yellow_days,

 

As mentioned above, you may take advantage of USERELATIONSHIP Function in the measure. As for the result, show us a complete example.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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