Forum Discussion

BINeophyte's avatar
BINeophyte
New Member
7 years ago

date range between two different columns

Hello everyone, 

 

Coming from a Tableau background, I am fairly new to the Power BI Community. 

 

Currently, my organization is trying to identify "Active Clients" based on their Start Date and their End Date within various programs. 

 

In Tableau the calculation that worked for us was: 

 

IF( [Project Start Date] <= #7/31/2017#

AND (ISNULL( [Project Exit Date])

OR [Project Exit Date] >= #7/1/2017#))

THEN [Client Unique Identifier]

END

 

Basically, we want to get a list of individuals that were active for the month of July if their start date was July 1, 2017 or later and if they exited the program before the end of July 31, 2017 or they do not have an exit date. 

 

I was trying to work with the DATESBETWEEN( ) function, but I'm getting stuck on using it for two different columns within the same table. 

 

What would be a Power BI equivalent to this?? Any input is greatly appreciated. 

2 Replies

  • Hello everyone, 

     

    Coming from a Tableau background, I am fairly new to the Power BI Community. 

     

    Currently, my organization is trying to identify "Active Clients" based on their Start Date and their End Date within various programs. 

     

    In Tableau the calculation that worked for us was: 

     

    IF( [Project Start Date] <= #7/31/2017#

    AND (ISNULL( [Project Exit Date])

    OR [Project Exit Date] >= #7/1/2017#))

    THEN [Client Unique Identifier]

    END

     

    Basically, we want to get a list of individuals that were active for the month of July if their start date was July 1, 2017 or later and if they exited the program before the end of July 31, 2017 or they do not have an exit date. 

     

    I was trying to work with the DATESBETWEEN( ) function, but I'm getting stuck on using it for two different columns within the same table. 

     

    What would be a Power BI equivalent to this?? Any input is greatly appreciated.