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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ElliotPBI
New Member

Role-Playing Dimensions with two dates

Hey all,

 

I've done a bunch of research and I have been watching Guy in a Cube with Role-Playing Dimensions - though I'm a little stuck.

 

I'm trying to figure out how many activities were started and ended on a particular day, and work with a single date slicer accordingly.

I'm using a matrix table with the following:

  • X-axis - Activity Type
  • Y-axis - Count of Activity Type
  • Legend - Status

Simplified, I just want it to show where I pick February 2024 as a month in my date slicer, it'll show:

 

DateStartedClosed
02/01/202460
02/03/202406

 

But if I pick 3 February 2024 specifically in the slicer, it'll show:

 

DateStartedClosed
02/03/202406

 

What I've done

My main data source is called 'Data' and I've created two date tables using the following:

  • StartDate = CALENDAR(MIN('Data'[Start Date]), MAX('Data'[Start Date]))
  • EndDate = CALENDAR(MIN('Data'[End Date]), MAX('Data'[End Date]))

I've then created the necessary relationships, though I'm stuck on getting the figures to match or make the relationships work.

 

Guy in a Cube used 'Shipped Sales Amount = CALCULATE(SUM('Internet Sales'[SalesAmount]), USERELATIONSHIP('OrderDate'[Date], 'Internet Sales'[Ship Date]))' for his method, and even when I've tried to recreate this, I can't make it match.

 

Have I just lost my train of thought each time or is what I'm doing possible?

 

My data sample is below -

 

Start Date

End DateStatusActivity TypeUser
1/01/202131/01/2021Done1111User 1
1/02/202128/02/2021In Progress2222User 2
1/03/202131/03/2021Unallocated3333User 3
1/04/202130/04/2021Pending4444User 4
1/05/202131/05/2021Done1111User 1
1/06/202130/06/2021In Progress2222User 2
1/07/202131/07/2021Unallocated3333User 3
1/08/2021 Pending4444User 4
1/09/202130/09/2021Done1111User 1
1/10/202131/10/2021In Progress2222User 2
1/11/202130/11/2021Unallocated3333User 3
1/12/202131/12/2021Pending4444User 4
1/01/202231/01/2022Done1111User 1
1/02/202228/02/2022In Progress2222User 2
1/03/202231/03/2022Unallocated3333User 3
1/04/202230/04/2022Pending4444User 4
1/05/202231/05/2022Done1111User 1
1/06/202230/06/2022In Progress2222User 2
1/07/202231/07/2022Unallocated3333User 3
1/08/202231/08/2022Pending4444User 4
1/09/202230/09/2022Done1111User 1
1/10/202231/10/2022In Progress2222User 2
1/11/202230/11/2022Unallocated3333User 3
1/12/202231/12/2022Pending4444User 4
1/01/2023 Done1111User 1
1/02/202328/02/2023In Progress2222User 2
1/03/202331/03/2023Unallocated3333User 3
1/04/202330/04/2023Pending4444User 4
1/05/202331/05/2023Done1111User 1
1/06/202330/06/2023In Progress2222User 2
1/07/202331/07/2023Unallocated3333User 3
1/08/2023 Pending4444User 4
1/09/2023 Done1111User 1
1/10/202331/10/2023In Progress2222User 2
1/11/202330/11/2023Unallocated3333User 3
1/12/202331/12/2023Pending4444User 4
1/02/20243/02/2024Done1111User 4
1/02/20243/02/2024Done1111User 4
1/02/20243/02/2024Done1111User 4
1/02/20243/02/2024Done1111User 4
1/02/20243/02/2024Done1111User 4
1/02/20243/02/2024Done1111User 4

 

 

Thanks in advance

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @ElliotPBI ,

 

You can have two approaches:

Dates table not having a relationship to fact

Dates table having an active and inactive relationship to fact.

Please see sample pbix.

danextian_0-1707981086269.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @ElliotPBI ,

 

You can have two approaches:

Dates table not having a relationship to fact

Dates table having an active and inactive relationship to fact.

Please see sample pbix.

danextian_0-1707981086269.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

This worked for my scenario - I was so close in what I had experimented with! Though that really helped and I was able to translate it into my own report - thanks!

TomMartens
Super User
Super User

Hey @ElliotPBI ,

 

you can not control the values of two different columns with a single slicer.
Role Playing dimensions are shape shifter, or actors in disguise, for this reason they can never appear on the stage at the same time.

If you need to select two values from two different columns (start and end) at the same time, then you need two date tables, two "active" relationships, and two slicers.

 

My friend Nikola Ilic blogged about it here: https://data-mozart.com/welcome-to-powerbi-thetare-role-playing-dimensions/

He calls it "two roles - two actors".

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors