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