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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
pikers
Frequent Visitor

Historical Count of Open Positions By Month

Hi all,

 

I have what I thought would be an easy request turn into me ripping my hair out (or what's left of it) over the past two days, I could use some help.

 

The ask is to provide counts of open reqs (open positions) as far back as we have data. The model is as simple as it gets, just a table with req data and a date table. Within the req table there is ID, create_date, on_hold_date, off_hold_date, and closed_date. What I'm trying to do is get a count of open reqs by month for the past X years. For a req to be considered "open" for a given month, it needs to have:

  • a create_date before the last day of the month
  • a closed_date of NULL or a closed_date after the end of the month
  • on hold date is:
    • Null
    • After the end of the month
    • Before the end of the month but off_hold_date is also before or equal to the last day of the month

pikers_2-1683823223329.png

 

I tried a few different measures and I couldn't get anything to work. Any help would be greatly appreciated. 

1 REPLY 1
johnt75
Super User
Super User

Try

Open reqs =
VAR ReferenceDate =
    MAX ( 'Date'[Date] )
VAR Result =
    CALCULATE (
        COUNTROWS ( 'Reqs' ),
        REMOVEFILTERS ( 'Date' ),
        'Reqs'[Open date] <= ReferenceDate,
        'Reqs'[Closed date] > ReferenceDate
            || ISBLANK ( 'Reqs'[Closed date] ),
        'Reqs'[On hold date] > ReferenceDate
            || ISBLANK ( 'Reqs'[On hold date] )
            || 'Reqs'[Off hold date] <= ReferenceDate
    )
RETURN
    Result

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors