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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.