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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MitchTrott
Frequent Visitor

Help to show roles that are ending

Hi All,

 

I need to create a visualisation to show roles that are due to finish each month on a project.  I have the end dates in a cloumn named [Role Finish Date] along with other information such as [Name] [Project] [Role] [Function] etc so i should be able to create a graph to show how many roles are ending each month but for some reason it is getting the better of me.

 

This is what i have tried so far but it is returning some funky visuals that are way off:

 

Count of ending roles = 

VAR currentDate =

       MAX('Date Table'[Date])

RETURN

       CALCULATE(

              COUNTROWS(TTracker),

              FILTER(

                    TTracker,

                    (TTracker[Role Start Date <= currentDate && TTracker[Role Finish Date] >= currentDate)   

             )

       )

 

Any advice on creating this visual would be gratly appreciated

1 REPLY 1
johnt75
Super User
Super User

Create a relationship from the date table to the role finish date, make it inactive if necessary, and then you can use

Num ending rows =
CALCULATE (
    COUNTROWS ( 'TTracker' ),
    USERELATIONSHIP ( 'Date'[Date], 'TTracker'[Role finish date] )
)

If you can make the relationship active then you would only need COUNTROWS('TTracker')

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.