cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
yellow_days Regular Visitor
Regular Visitor

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
Super User
Super User

Re: Role Play Dimension doesn't work

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



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

Proud to be a Datanaut!




yellow_days Regular Visitor
Regular Visitor

Re: Role Play Dimension doesn't work

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

 

Community Support Team
Community Support Team

Re: Role Play Dimension doesn't work

@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.