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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.