Forum Discussion

ElliotPBI's avatar
ElliotPBI
New Member
2 years ago
Solved

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

3 Replies

    • ElliotPBI's avatar
      ElliotPBI
      New Member

      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!

  • 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