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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DerekC
Frequent Visitor

Show all Dates Between for Arrival and Release Dates for Multiple ID's

I have a need to show a trend of number of assets at a certain location.  I have arrival and release dates, but I want to show total number of all at the location on a daily basis.  Below is a simplified version of the data and graph I am looking for.  

 

ID ArriveRelease
11/10/20232/2/2023
21/15/20232/5/2023
31/31/20232/10/2023
42/3/20232/10/2023

DerekC_0-1677509810776.png

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

Num at location =
VAR CurrentDate =
    MAX ( 'Date'[Date] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[ID] ),
        'Table'[Arrival] <= CurrentDate
            && (
                'Table'[Release] > CurrentDate
                    || ISBLANK ( 'Table'[Release] )
            )
    )

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Try

Num at location =
VAR CurrentDate =
    MAX ( 'Date'[Date] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[ID] ),
        'Table'[Arrival] <= CurrentDate
            && (
                'Table'[Release] > CurrentDate
                    || ISBLANK ( 'Table'[Release] )
            )
    )

Thank you!  I just made sure that my relationship between the date table and my data table was inactive and it worked.  

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.